diff options
author | vibi sreenivasan <vibi_sreenivasan@cms.com> | 2009-06-04 11:26:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 14:00:54 -0400 |
commit | 8d2db5169d103d03646e7b7e93798739b2290d22 (patch) | |
tree | 71bc565ae7891a515587b6e74ecf5c2cbc3657c3 /drivers/staging/rspiusb/rspiusb.c | |
parent | 14e8bcd0866a93ae1c20efa462e5d4807a1398a0 (diff) |
Staging: rspiusb: Fix a bunch of warnings.
The patch fixes the following warnings.
drivers/staging/rspiusb/rspiusb.c: In function ‘pixel_data’:
drivers/staging/rspiusb/rspiusb.c:267: warning: passing argument 1 of ‘SetPageDirty’ makes
pointer from integer without a cast
drivers/staging/rspiusb/rspiusb.c: In function ‘UnMapUserBuffer’:
drivers/staging/rspiusb/rspiusb.c:500: warning: passing argument 1 of ‘put_page’ makes
pointer from integer without a cast
drivers/staging/rspiusb/rspiusb.c: In function ‘MapUserBuffer’:
drivers/staging/rspiusb/rspiusb.c:662: warning: assignment makes integer from pointer without a cast
drivers/staging/rspiusb/rspiusb.c:670: warning: assignment makes integer from pointer without a cast
Signed-off-by: Vibi Sreenivasan <vibi_sreenivasan@cms.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rspiusb/rspiusb.c')
-rw-r--r-- | drivers/staging/rspiusb/rspiusb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/rspiusb/rspiusb.c b/drivers/staging/rspiusb/rspiusb.c index 090bf41ebcd..ebdbe41fbcc 100644 --- a/drivers/staging/rspiusb/rspiusb.c +++ b/drivers/staging/rspiusb/rspiusb.c | |||
@@ -264,7 +264,7 @@ static int pixel_data(struct ioctl_struct *ctrl, struct device_extension *pdx) | |||
264 | pdx->bulk_in_size_returned -= pdx->frameSize; | 264 | pdx->bulk_in_size_returned -= pdx->frameSize; |
265 | 265 | ||
266 | for (i = 0; i < pdx->maplist_numPagesMapped[pdx->active_frame]; i++) | 266 | for (i = 0; i < pdx->maplist_numPagesMapped[pdx->active_frame]; i++) |
267 | SetPageDirty(pdx->sgl[pdx->active_frame][i].page_link); | 267 | SetPageDirty(sg_page(&pdx->sgl[pdx->active_frame][i])); |
268 | 268 | ||
269 | pdx->active_frame = ((pdx->active_frame + 1) % pdx->num_frames); | 269 | pdx->active_frame = ((pdx->active_frame + 1) % pdx->num_frames); |
270 | 270 | ||
@@ -497,7 +497,7 @@ static int UnMapUserBuffer(struct device_extension *pdx) | |||
497 | usb_buffer_unmap_sg(pdx->udev, epAddr, pdx->sgl[k], | 497 | usb_buffer_unmap_sg(pdx->udev, epAddr, pdx->sgl[k], |
498 | pdx->maplist_numPagesMapped[k]); | 498 | pdx->maplist_numPagesMapped[k]); |
499 | for (i = 0; i < pdx->maplist_numPagesMapped[k]; i++) | 499 | for (i = 0; i < pdx->maplist_numPagesMapped[k]; i++) |
500 | page_cache_release(pdx->sgl[k][i].page_link); | 500 | page_cache_release(sg_page(&pdx->sgl[k][i])); |
501 | kfree(pdx->sgl[k]); | 501 | kfree(pdx->sgl[k]); |
502 | kfree(pdx->PixelUrb[k]); | 502 | kfree(pdx->PixelUrb[k]); |
503 | kfree(pdx->pendedPixelUrbs[k]); | 503 | kfree(pdx->pendedPixelUrbs[k]); |
@@ -659,7 +659,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx) | |||
659 | dbg("can't allocate mem for sgl"); | 659 | dbg("can't allocate mem for sgl"); |
660 | return -ENOMEM; | 660 | return -ENOMEM; |
661 | } | 661 | } |
662 | pdx->sgl[frameInfo][0].page_link = maplist_p[0]; | 662 | sg_assign_page(&pdx->sgl[frameInfo][0], maplist_p[0]); |
663 | pdx->sgl[frameInfo][0].offset = uaddr & ~PAGE_MASK; | 663 | pdx->sgl[frameInfo][0].offset = uaddr & ~PAGE_MASK; |
664 | if (pdx->maplist_numPagesMapped[frameInfo] > 1) { | 664 | if (pdx->maplist_numPagesMapped[frameInfo] > 1) { |
665 | pdx->sgl[frameInfo][0].length = | 665 | pdx->sgl[frameInfo][0].length = |
@@ -667,7 +667,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx) | |||
667 | count -= pdx->sgl[frameInfo][0].length; | 667 | count -= pdx->sgl[frameInfo][0].length; |
668 | for (k = 1; k < pdx->maplist_numPagesMapped[frameInfo]; k++) { | 668 | for (k = 1; k < pdx->maplist_numPagesMapped[frameInfo]; k++) { |
669 | pdx->sgl[frameInfo][k].offset = 0; | 669 | pdx->sgl[frameInfo][k].offset = 0; |
670 | pdx->sgl[frameInfo][k].page_link = maplist_p[k]; | 670 | sg_assign_page(&pdx->sgl[frameInfo][k], maplist_p[k]); |
671 | pdx->sgl[frameInfo][k].length = | 671 | pdx->sgl[frameInfo][k].length = |
672 | (count < PAGE_SIZE) ? count : PAGE_SIZE; | 672 | (count < PAGE_SIZE) ? count : PAGE_SIZE; |
673 | count -= PAGE_SIZE; /* example had PAGE_SIZE here */ | 673 | count -= PAGE_SIZE; /* example had PAGE_SIZE here */ |