Commit d2b1ff71 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: uss720.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent abd83e4b
...@@ -118,7 +118,8 @@ static void async_complete(struct urb *urb) ...@@ -118,7 +118,8 @@ static void async_complete(struct urb *urb)
priv = rq->priv; priv = rq->priv;
pp = priv->pp; pp = priv->pp;
if (status) { if (status) {
err("async_complete: urb error %d", status); dev_err(&urb->dev->dev, "async_complete: urb error %d\n",
status);
} else if (rq->dr.bRequest == 3) { } else if (rq->dr.bRequest == 3) {
memcpy(priv->reg, rq->reg, sizeof(priv->reg)); memcpy(priv->reg, rq->reg, sizeof(priv->reg));
#if 0 #if 0
...@@ -151,7 +152,7 @@ static struct uss720_async_request *submit_async_request(struct parport_uss720_p ...@@ -151,7 +152,7 @@ static struct uss720_async_request *submit_async_request(struct parport_uss720_p
return NULL; return NULL;
rq = kmalloc(sizeof(struct uss720_async_request), mem_flags); rq = kmalloc(sizeof(struct uss720_async_request), mem_flags);
if (!rq) { if (!rq) {
err("submit_async_request out of memory"); dev_err(&usbdev->dev, "submit_async_request out of memory\n");
return NULL; return NULL;
} }
kref_init(&rq->ref_count); kref_init(&rq->ref_count);
...@@ -162,7 +163,7 @@ static struct uss720_async_request *submit_async_request(struct parport_uss720_p ...@@ -162,7 +163,7 @@ static struct uss720_async_request *submit_async_request(struct parport_uss720_p
rq->urb = usb_alloc_urb(0, mem_flags); rq->urb = usb_alloc_urb(0, mem_flags);
if (!rq->urb) { if (!rq->urb) {
kref_put(&rq->ref_count, destroy_async); kref_put(&rq->ref_count, destroy_async);
err("submit_async_request out of memory"); dev_err(&usbdev->dev, "submit_async_request out of memory\n");
return NULL; return NULL;
} }
rq->dr.bRequestType = requesttype; rq->dr.bRequestType = requesttype;
...@@ -182,7 +183,7 @@ static struct uss720_async_request *submit_async_request(struct parport_uss720_p ...@@ -182,7 +183,7 @@ static struct uss720_async_request *submit_async_request(struct parport_uss720_p
if (!ret) if (!ret)
return rq; return rq;
destroy_async(&rq->ref_count); destroy_async(&rq->ref_count);
err("submit_async_request submit_urb failed with %d", ret); dev_err(&usbdev->dev, "submit_async_request submit_urb failed with %d\n", ret);
return NULL; return NULL;
} }
...@@ -217,7 +218,8 @@ static int get_1284_register(struct parport *pp, unsigned char reg, unsigned cha ...@@ -217,7 +218,8 @@ static int get_1284_register(struct parport *pp, unsigned char reg, unsigned cha
priv = pp->private_data; priv = pp->private_data;
rq = submit_async_request(priv, 3, 0xc0, ((unsigned int)reg) << 8, 0, mem_flags); rq = submit_async_request(priv, 3, 0xc0, ((unsigned int)reg) << 8, 0, mem_flags);
if (!rq) { if (!rq) {
err("get_1284_register(%u) failed", (unsigned int)reg); dev_err(&priv->usbdev->dev, "get_1284_register(%u) failed",
(unsigned int)reg);
return -EIO; return -EIO;
} }
if (!val) { if (!val) {
...@@ -248,7 +250,8 @@ static int set_1284_register(struct parport *pp, unsigned char reg, unsigned cha ...@@ -248,7 +250,8 @@ static int set_1284_register(struct parport *pp, unsigned char reg, unsigned cha
priv = pp->private_data; priv = pp->private_data;
rq = submit_async_request(priv, 4, 0x40, (((unsigned int)reg) << 8) | val, 0, mem_flags); rq = submit_async_request(priv, 4, 0x40, (((unsigned int)reg) << 8) | val, 0, mem_flags);
if (!rq) { if (!rq) {
err("set_1284_register(%u,%u) failed", (unsigned int)reg, (unsigned int)val); dev_err(&priv->usbdev->dev, "set_1284_register(%u,%u) failed",
(unsigned int)reg, (unsigned int)val);
return -EIO; return -EIO;
} }
kref_put(&rq->ref_count, destroy_async); kref_put(&rq->ref_count, destroy_async);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment