From 8d2db5169d103d03646e7b7e93798739b2290d22 Mon Sep 17 00:00:00 2001 From: vibi sreenivasan Date: Thu, 4 Jun 2009 20:56:45 +0530 Subject: [PATCH] Staging: rspiusb: Fix a bunch of warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rspiusb/rspiusb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rspiusb/rspiusb.c b/drivers/staging/rspiusb/rspiusb.c index 090bf41ebcd2..ebdbe41fbcc3 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) pdx->bulk_in_size_returned -= pdx->frameSize; for (i = 0; i < pdx->maplist_numPagesMapped[pdx->active_frame]; i++) - SetPageDirty(pdx->sgl[pdx->active_frame][i].page_link); + SetPageDirty(sg_page(&pdx->sgl[pdx->active_frame][i])); pdx->active_frame = ((pdx->active_frame + 1) % pdx->num_frames); @@ -497,7 +497,7 @@ static int UnMapUserBuffer(struct device_extension *pdx) usb_buffer_unmap_sg(pdx->udev, epAddr, pdx->sgl[k], pdx->maplist_numPagesMapped[k]); for (i = 0; i < pdx->maplist_numPagesMapped[k]; i++) - page_cache_release(pdx->sgl[k][i].page_link); + page_cache_release(sg_page(&pdx->sgl[k][i])); kfree(pdx->sgl[k]); kfree(pdx->PixelUrb[k]); kfree(pdx->pendedPixelUrbs[k]); @@ -659,7 +659,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx) dbg("can't allocate mem for sgl"); return -ENOMEM; } - pdx->sgl[frameInfo][0].page_link = maplist_p[0]; + sg_assign_page(&pdx->sgl[frameInfo][0], maplist_p[0]); pdx->sgl[frameInfo][0].offset = uaddr & ~PAGE_MASK; if (pdx->maplist_numPagesMapped[frameInfo] > 1) { pdx->sgl[frameInfo][0].length = @@ -667,7 +667,7 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx) count -= pdx->sgl[frameInfo][0].length; for (k = 1; k < pdx->maplist_numPagesMapped[frameInfo]; k++) { pdx->sgl[frameInfo][k].offset = 0; - pdx->sgl[frameInfo][k].page_link = maplist_p[k]; + sg_assign_page(&pdx->sgl[frameInfo][k], maplist_p[k]); pdx->sgl[frameInfo][k].length = (count < PAGE_SIZE) ? count : PAGE_SIZE; count -= PAGE_SIZE; /* example had PAGE_SIZE here */ -- 2.20.1