Re: [PATCH] USB: s3c-hsotg: replace deprecated dma_sync_single()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FUJITA Tomonori wrote:
> This replaces deprecated dma_sync_single() with dma_sync_single_for_cpu().
> 
> There is no functional change because dma_sync_single() simply calls
> dma_sync_single_for_cpu():

It would have been nice to be able to find a reference on what to
change when I had a look at this a few days ago (trying to get the
DMA support working better)

> static inline void __deprecated dma_sync_single(struct device *dev,
>        	      	   				dma_addr_t addr, size_t size,
> 						enum dma_data_direction dir)
> {
> 	dma_sync_single_for_cpu(dev, addr, size, dir);
> }
> 
> This fixes the following compile warnings:
> 
> drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_unmap_dma':
> drivers/usb/gadget/s3c-hsotg.c:376: warning: 'dma_sync_single' is deprecated (declared at /home/fujita/git/linux-2.6/include/linux/dma-mapping.h:109)
> drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_map_dma':
> drivers/usb/gadget/s3c-hsotg.c:758: warning: 'dma_sync_single' is deprecated (declared at /home/fujita/git/linux-2.6/include/linux/dma-mapping.h:109)
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
> Cc: Ben Dooks <ben@xxxxxxxxxxxx>
Acked-by: Ben Dooks <ben@xxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
> ---
>  drivers/usb/gadget/s3c-hsotg.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
> index 4b5dbd0..284893d 100644
> --- a/drivers/usb/gadget/s3c-hsotg.c
> +++ b/drivers/usb/gadget/s3c-hsotg.c
> @@ -373,7 +373,7 @@ static void s3c_hsotg_unmap_dma(struct s3c_hsotg *hsotg,
>  		req->dma = DMA_ADDR_INVALID;
>  		hs_req->mapped = 0;
>  	} else {
> -		dma_sync_single(hsotg->dev, req->dma, req->length, dir);
> +		dma_sync_single_for_cpu(hsotg->dev, req->dma, req->length, dir);
>  	}
>  }
>  
> @@ -755,7 +755,7 @@ static int s3c_hsotg_map_dma(struct s3c_hsotg *hsotg,
>  		hs_req->mapped = 1;
>  		req->dma = dma;
>  	} else {
> -		dma_sync_single(hsotg->dev, req->dma, req->length, dir);
> +		dma_sync_single_for_cpu(hsotg->dev, req->dma, req->length, dir);
>  		hs_req->mapped = 0;
>  	}
>  

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux