Skip to content

Commit

Permalink
USB: s3c-hsotg: replace deprecated dma_sync_single()
Browse files Browse the repository at this point in the history
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():

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@lab.ntt.co.jp>
Acked-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
FUJITA Tomonori authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent ab3bbfa commit 5b52025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/s3c-hsotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,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);
}
}

Expand Down Expand Up @@ -756,7 +756,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;
}

Expand Down

0 comments on commit 5b52025

Please sign in to comment.