aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/appledisplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/appledisplay.c')
-rw-r--r--drivers/usb/misc/appledisplay.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
index 71d672ea1229..1d8e39a557d9 100644
--- a/drivers/usb/misc/appledisplay.c
+++ b/drivers/usb/misc/appledisplay.c
@@ -130,7 +130,8 @@ static void appledisplay_complete(struct urb *urb)
130exit: 130exit:
131 retval = usb_submit_urb(pdata->urb, GFP_ATOMIC); 131 retval = usb_submit_urb(pdata->urb, GFP_ATOMIC);
132 if (retval) { 132 if (retval) {
133 err("%s - usb_submit_urb failed with result %d", 133 dev_err(&pdata->udev->dev,
134 "%s - usb_submit_urb failed with result %d\n",
134 __func__, retval); 135 __func__, retval);
135 } 136 }
136} 137}
@@ -220,7 +221,7 @@ static int appledisplay_probe(struct usb_interface *iface,
220 } 221 }
221 } 222 }
222 if (!int_in_endpointAddr) { 223 if (!int_in_endpointAddr) {
223 err("Could not find int-in endpoint"); 224 dev_err(&iface->dev, "Could not find int-in endpoint\n");
224 return -EIO; 225 return -EIO;
225 } 226 }
226 227
@@ -228,7 +229,7 @@ static int appledisplay_probe(struct usb_interface *iface,
228 pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL); 229 pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL);
229 if (!pdata) { 230 if (!pdata) {
230 retval = -ENOMEM; 231 retval = -ENOMEM;
231 err("Out of memory"); 232 dev_err(&iface->dev, "Out of memory\n");
232 goto error; 233 goto error;
233 } 234 }
234 235
@@ -241,8 +242,8 @@ static int appledisplay_probe(struct usb_interface *iface,
241 pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL); 242 pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL);
242 if (!pdata->msgdata) { 243 if (!pdata->msgdata) {
243 retval = -ENOMEM; 244 retval = -ENOMEM;
244 err("appledisplay: Allocating buffer for control messages " 245 dev_err(&iface->dev,
245 "failed"); 246 "Allocating buffer for control messages failed\n");
246 goto error; 247 goto error;
247 } 248 }
248 249
@@ -250,7 +251,7 @@ static int appledisplay_probe(struct usb_interface *iface,
250 pdata->urb = usb_alloc_urb(0, GFP_KERNEL); 251 pdata->urb = usb_alloc_urb(0, GFP_KERNEL);
251 if (!pdata->urb) { 252 if (!pdata->urb) {
252 retval = -ENOMEM; 253 retval = -ENOMEM;
253 err("appledisplay: Allocating URB failed"); 254 dev_err(&iface->dev, "Allocating URB failed\n");
254 goto error; 255 goto error;
255 } 256 }
256 257
@@ -259,7 +260,7 @@ static int appledisplay_probe(struct usb_interface *iface,
259 GFP_KERNEL, &pdata->urb->transfer_dma); 260 GFP_KERNEL, &pdata->urb->transfer_dma);
260 if (!pdata->urbdata) { 261 if (!pdata->urbdata) {
261 retval = -ENOMEM; 262 retval = -ENOMEM;
262 err("appledisplay: Allocating URB buffer failed"); 263 dev_err(&iface->dev, "Allocating URB buffer failed\n");
263 goto error; 264 goto error;
264 } 265 }
265 266
@@ -270,7 +271,7 @@ static int appledisplay_probe(struct usb_interface *iface,
270 pdata, 1); 271 pdata, 1);
271 if (usb_submit_urb(pdata->urb, GFP_KERNEL)) { 272 if (usb_submit_urb(pdata->urb, GFP_KERNEL)) {
272 retval = -EIO; 273 retval = -EIO;
273 err("appledisplay: Submitting URB failed"); 274 dev_err(&iface->dev, "Submitting URB failed\n");
274 goto error; 275 goto error;
275 } 276 }
276 277
@@ -280,7 +281,7 @@ static int appledisplay_probe(struct usb_interface *iface,
280 pdata->bd = backlight_device_register(bl_name, NULL, pdata, 281 pdata->bd = backlight_device_register(bl_name, NULL, pdata,
281 &appledisplay_bl_data); 282 &appledisplay_bl_data);
282 if (IS_ERR(pdata->bd)) { 283 if (IS_ERR(pdata->bd)) {
283 err("appledisplay: Backlight registration failed"); 284 dev_err(&iface->dev, "Backlight registration failed\n");
284 goto error; 285 goto error;
285 } 286 }
286 287
@@ -291,7 +292,8 @@ static int appledisplay_probe(struct usb_interface *iface,
291 292
292 if (brightness < 0) { 293 if (brightness < 0) {
293 retval = brightness; 294 retval = brightness;
294 err("appledisplay: Error while getting initial brightness: %d", retval); 295 dev_err(&iface->dev,
296 "Error while getting initial brightness: %d\n", retval);
295 goto error; 297 goto error;
296 } 298 }
297 299
@@ -352,7 +354,7 @@ static int __init appledisplay_init(void)
352{ 354{
353 wq = create_singlethread_workqueue("appledisplay"); 355 wq = create_singlethread_workqueue("appledisplay");
354 if (!wq) { 356 if (!wq) {
355 err("Could not create work queue\n"); 357 printk(KERN_ERR "appledisplay: Could not create work queue\n");
356 return -ENOMEM; 358 return -ENOMEM;
357 } 359 }
358 360