|
@@ -130,7 +130,8 @@ static void appledisplay_complete(struct urb *urb)
|
|
exit:
|
|
exit:
|
|
retval = usb_submit_urb(pdata->urb, GFP_ATOMIC);
|
|
retval = usb_submit_urb(pdata->urb, GFP_ATOMIC);
|
|
if (retval) {
|
|
if (retval) {
|
|
- err("%s - usb_submit_urb failed with result %d",
|
|
|
|
|
|
+ dev_err(&pdata->udev->dev,
|
|
|
|
+ "%s - usb_submit_urb failed with result %d\n",
|
|
__func__, retval);
|
|
__func__, retval);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -220,7 +221,7 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!int_in_endpointAddr) {
|
|
if (!int_in_endpointAddr) {
|
|
- err("Could not find int-in endpoint");
|
|
|
|
|
|
+ dev_err(&iface->dev, "Could not find int-in endpoint\n");
|
|
return -EIO;
|
|
return -EIO;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -228,7 +229,7 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|
pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL);
|
|
pdata = kzalloc(sizeof(struct appledisplay), GFP_KERNEL);
|
|
if (!pdata) {
|
|
if (!pdata) {
|
|
retval = -ENOMEM;
|
|
retval = -ENOMEM;
|
|
- err("Out of memory");
|
|
|
|
|
|
+ dev_err(&iface->dev, "Out of memory\n");
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -241,8 +242,8 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|
pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL);
|
|
pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL);
|
|
if (!pdata->msgdata) {
|
|
if (!pdata->msgdata) {
|
|
retval = -ENOMEM;
|
|
retval = -ENOMEM;
|
|
- err("appledisplay: Allocating buffer for control messages "
|
|
|
|
- "failed");
|
|
|
|
|
|
+ dev_err(&iface->dev,
|
|
|
|
+ "Allocating buffer for control messages failed\n");
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -250,7 +251,7 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|
pdata->urb = usb_alloc_urb(0, GFP_KERNEL);
|
|
pdata->urb = usb_alloc_urb(0, GFP_KERNEL);
|
|
if (!pdata->urb) {
|
|
if (!pdata->urb) {
|
|
retval = -ENOMEM;
|
|
retval = -ENOMEM;
|
|
- err("appledisplay: Allocating URB failed");
|
|
|
|
|
|
+ dev_err(&iface->dev, "Allocating URB failed\n");
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -259,7 +260,7 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|
GFP_KERNEL, &pdata->urb->transfer_dma);
|
|
GFP_KERNEL, &pdata->urb->transfer_dma);
|
|
if (!pdata->urbdata) {
|
|
if (!pdata->urbdata) {
|
|
retval = -ENOMEM;
|
|
retval = -ENOMEM;
|
|
- err("appledisplay: Allocating URB buffer failed");
|
|
|
|
|
|
+ dev_err(&iface->dev, "Allocating URB buffer failed\n");
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -270,7 +271,7 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|
pdata, 1);
|
|
pdata, 1);
|
|
if (usb_submit_urb(pdata->urb, GFP_KERNEL)) {
|
|
if (usb_submit_urb(pdata->urb, GFP_KERNEL)) {
|
|
retval = -EIO;
|
|
retval = -EIO;
|
|
- err("appledisplay: Submitting URB failed");
|
|
|
|
|
|
+ dev_err(&iface->dev, "Submitting URB failed\n");
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -280,7 +281,7 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|
pdata->bd = backlight_device_register(bl_name, NULL, pdata,
|
|
pdata->bd = backlight_device_register(bl_name, NULL, pdata,
|
|
&appledisplay_bl_data);
|
|
&appledisplay_bl_data);
|
|
if (IS_ERR(pdata->bd)) {
|
|
if (IS_ERR(pdata->bd)) {
|
|
- err("appledisplay: Backlight registration failed");
|
|
|
|
|
|
+ dev_err(&iface->dev, "Backlight registration failed\n");
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -291,7 +292,8 @@ static int appledisplay_probe(struct usb_interface *iface,
|
|
|
|
|
|
if (brightness < 0) {
|
|
if (brightness < 0) {
|
|
retval = brightness;
|
|
retval = brightness;
|
|
- err("appledisplay: Error while getting initial brightness: %d", retval);
|
|
|
|
|
|
+ dev_err(&iface->dev,
|
|
|
|
+ "Error while getting initial brightness: %d\n", retval);
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -352,7 +354,7 @@ static int __init appledisplay_init(void)
|
|
{
|
|
{
|
|
wq = create_singlethread_workqueue("appledisplay");
|
|
wq = create_singlethread_workqueue("appledisplay");
|
|
if (!wq) {
|
|
if (!wq) {
|
|
- err("Could not create work queue\n");
|
|
|
|
|
|
+ printk(KERN_ERR "appledisplay: Could not create work queue\n");
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|
|
|
|
|