diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-17 19:36:03 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-17 19:45:53 -0700 |
commit | 6ede1edea3e7632e50a4b86165112d6364cdadb6 (patch) | |
tree | be6e360ef9abcdeb4c1c79a9a6e6ae922e3a6042 /drivers/staging/ced1401 | |
parent | 2eae6bdc12f4e49b7f94f032b82d664dcf3881bc (diff) | |
download | op-kernel-dev-6ede1edea3e7632e50a4b86165112d6364cdadb6.zip op-kernel-dev-6ede1edea3e7632e50a4b86165112d6364cdadb6.tar.gz |
Staging: ced1401: usb1401: fix build errors.
This fixes up the usb1401.c file to remove the usage of err() (which is
gone), and the two-argument kmap_atomic() call, and the compat_ioctl
pointer warning.
The code now builds properly, there are lots of warnings still, but it's
a start.
Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Cc: Greg P. Smith <greg@ced.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ced1401')
-rw-r--r-- | drivers/staging/ced1401/usb1401.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/staging/ced1401/usb1401.c b/drivers/staging/ced1401/usb1401.c index 54595b8..bf08baa 100644 --- a/drivers/staging/ced1401/usb1401.c +++ b/drivers/staging/ced1401/usb1401.c @@ -171,7 +171,7 @@ static int ced_open(struct inode *inode, struct file *file) struct usb_interface* interface = usb_find_interface(&ced_driver, subminor); if (!interface) { - err("%s - error, can't find device for minor %d", __func__, subminor); + pr_err("%s - error, can't find device for minor %d", __func__, subminor); retval = -ENODEV; goto exit; } @@ -491,7 +491,7 @@ static void CopyUserSpace(DEVICE_EXTENSION *pdx, int n) int nPage = dwOffset >> PAGE_SHIFT; // page number in table if (nPage < pArea->nPages) { - char *pvAddress = (char*)kmap_atomic(pArea->pPages[nPage], KM_IRQ0); + char *pvAddress = (char*)kmap_atomic(pArea->pPages[nPage]); if (pvAddress) { unsigned int uiPageOff = dwOffset & (PAGE_SIZE-1); // offset into the page @@ -502,7 +502,7 @@ static void CopyUserSpace(DEVICE_EXTENSION *pdx, int n) memcpy(pvAddress+uiPageOff, pCoherBuf, uiXfer); else memcpy(pCoherBuf, pvAddress+uiPageOff, uiXfer); - kunmap_atomic(pvAddress, KM_IRQ0); + kunmap_atomic(pvAddress); dwOffset += uiXfer; pCoherBuf += uiXfer; n -= uiXfer; @@ -1198,7 +1198,7 @@ int Allowi(DEVICE_EXTENSION* pdx, bool bInCallback) ** enough for a 64-bit pointer. *****************************************************************************/ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) -static int ced_ioctl(struct file * file, unsigned int cmd, unsigned long ulArg) +static long ced_ioctl(struct file * file, unsigned int cmd, unsigned long ulArg) #else static int ced_ioctl(struct inode * node, struct file * file, unsigned int cmd, unsigned long ulArg) #endif @@ -1367,7 +1367,7 @@ static int ced_probe(struct usb_interface *interface, const struct usb_device_id pdx = kzalloc(sizeof(*pdx), GFP_KERNEL); if (!pdx) { - err("Out of memory"); + dev_err(&interface->dev, "Out of memory\n"); goto error; } @@ -1458,7 +1458,7 @@ static int ced_probe(struct usb_interface *interface, const struct usb_device_id if (retval) { /* something prevented us from registering this driver */ - err("Not able to get a minor for this device."); + dev_err(&interface->dev, "Not able to get a minor for this device.\n"); usb_set_intfdata(interface, NULL); goto error; } @@ -1578,11 +1578,7 @@ static struct usb_driver ced_driver = static int __init usb_skel_init(void) { /* register this driver with the USB subsystem */ - int result = usb_register(&ced_driver); - if (result) - err("usb_register failed. Error number %d", result); - - return result; + return usb_register(&ced_driver); } static void __exit usb_skel_exit(void) |