Commit 77c9e125 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: cxacru.c: remove dbg() usage

dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Simon Arlott <cxacru@fire.lp0.eu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b741ab9d
...@@ -674,7 +674,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, ...@@ -674,7 +674,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
} }
ret = offd; ret = offd;
dbg("cm %#x", cm); usb_dbg(instance->usbatm, "cm %#x\n", cm);
fail: fail:
mutex_unlock(&instance->cm_serialize); mutex_unlock(&instance->cm_serialize);
err: err:
...@@ -733,7 +733,7 @@ static int cxacru_card_status(struct cxacru_data *instance) ...@@ -733,7 +733,7 @@ static int cxacru_card_status(struct cxacru_data *instance)
{ {
int ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0); int ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0);
if (ret < 0) { /* firmware not loaded */ if (ret < 0) { /* firmware not loaded */
dbg("cxacru_adsl_start: CARD_GET_STATUS returned %d", ret); usb_dbg(instance->usbatm, "cxacru_adsl_start: CARD_GET_STATUS returned %d\n", ret);
return ret; return ret;
} }
return 0; return 0;
...@@ -758,7 +758,7 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance, ...@@ -758,7 +758,7 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance,
int ret; int ret;
int start_polling = 1; int start_polling = 1;
dbg("cxacru_atm_start"); dev_dbg(&intf->dev, "%s\n", __func__);
/* Read MAC address */ /* Read MAC address */
ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_MAC_ADDRESS, NULL, 0, ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_MAC_ADDRESS, NULL, 0,
...@@ -962,13 +962,13 @@ static int cxacru_fw(struct usb_device *usb_dev, enum cxacru_fw_request fw, ...@@ -962,13 +962,13 @@ static int cxacru_fw(struct usb_device *usb_dev, enum cxacru_fw_request fw,
ret = usb_bulk_msg(usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_CMD), ret = usb_bulk_msg(usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_CMD),
buf, offb, NULL, CMD_TIMEOUT); buf, offb, NULL, CMD_TIMEOUT);
if (ret < 0) { if (ret < 0) {
dbg("sending fw %#x failed", fw); dev_dbg(&usb_dev->dev, "sending fw %#x failed\n", fw);
goto cleanup; goto cleanup;
} }
offb = 0; offb = 0;
} }
} while (offd < size); } while (offd < size);
dbg("sent fw %#x", fw); dev_dbg(&usb_dev->dev, "sent fw %#x\n", fw);
ret = 0; ret = 0;
...@@ -988,7 +988,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance, ...@@ -988,7 +988,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
usb_dev->descriptor.idProduct }; usb_dev->descriptor.idProduct };
__le32 val; __le32 val;
dbg("cxacru_upload_firmware"); usb_dbg(usbatm, "%s\n", __func__);
/* FirmwarePllFClkValue */ /* FirmwarePllFClkValue */
val = cpu_to_le32(instance->modem_type->pll_f_clk); val = cpu_to_le32(instance->modem_type->pll_f_clk);
...@@ -1074,7 +1074,7 @@ static int cxacru_find_firmware(struct cxacru_data *instance, ...@@ -1074,7 +1074,7 @@ static int cxacru_find_firmware(struct cxacru_data *instance,
char buf[16]; char buf[16];
sprintf(buf, "cxacru-%s.bin", phase); sprintf(buf, "cxacru-%s.bin", phase);
dbg("cxacru_find_firmware: looking for %s", buf); usb_dbg(usbatm, "cxacru_find_firmware: looking for %s\n", buf);
if (request_firmware(fw_p, buf, dev)) { if (request_firmware(fw_p, buf, dev)) {
usb_dbg(usbatm, "no stage %s firmware found\n", phase); usb_dbg(usbatm, "no stage %s firmware found\n", phase);
...@@ -1115,9 +1115,9 @@ static int cxacru_heavy_init(struct usbatm_data *usbatm_instance, ...@@ -1115,9 +1115,9 @@ static int cxacru_heavy_init(struct usbatm_data *usbatm_instance,
ret = cxacru_card_status(instance); ret = cxacru_card_status(instance);
if (ret) if (ret)
dbg("modem initialisation failed"); usb_dbg(usbatm_instance, "modem initialisation failed\n");
else else
dbg("done setting up the modem"); usb_dbg(usbatm_instance, "done setting up the modem\n");
return ret; return ret;
} }
...@@ -1133,7 +1133,7 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance, ...@@ -1133,7 +1133,7 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
/* instance init */ /* instance init */
instance = kzalloc(sizeof(*instance), GFP_KERNEL); instance = kzalloc(sizeof(*instance), GFP_KERNEL);
if (!instance) { if (!instance) {
dbg("cxacru_bind: no memory for instance data"); usb_dbg(usbatm_instance, "cxacru_bind: no memory for instance data\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -1149,31 +1149,31 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance, ...@@ -1149,31 +1149,31 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
instance->rcv_buf = (u8 *) __get_free_page(GFP_KERNEL); instance->rcv_buf = (u8 *) __get_free_page(GFP_KERNEL);
if (!instance->rcv_buf) { if (!instance->rcv_buf) {
dbg("cxacru_bind: no memory for rcv_buf"); usb_dbg(usbatm_instance, "cxacru_bind: no memory for rcv_buf\n");
ret = -ENOMEM; ret = -ENOMEM;
goto fail; goto fail;
} }
instance->snd_buf = (u8 *) __get_free_page(GFP_KERNEL); instance->snd_buf = (u8 *) __get_free_page(GFP_KERNEL);
if (!instance->snd_buf) { if (!instance->snd_buf) {
dbg("cxacru_bind: no memory for snd_buf"); usb_dbg(usbatm_instance, "cxacru_bind: no memory for snd_buf\n");
ret = -ENOMEM; ret = -ENOMEM;
goto fail; goto fail;
} }
instance->rcv_urb = usb_alloc_urb(0, GFP_KERNEL); instance->rcv_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!instance->rcv_urb) { if (!instance->rcv_urb) {
dbg("cxacru_bind: no memory for rcv_urb"); usb_dbg(usbatm_instance, "cxacru_bind: no memory for rcv_urb\n");
ret = -ENOMEM; ret = -ENOMEM;
goto fail; goto fail;
} }
instance->snd_urb = usb_alloc_urb(0, GFP_KERNEL); instance->snd_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!instance->snd_urb) { if (!instance->snd_urb) {
dbg("cxacru_bind: no memory for snd_urb"); usb_dbg(usbatm_instance, "cxacru_bind: no memory for snd_urb\n");
ret = -ENOMEM; ret = -ENOMEM;
goto fail; goto fail;
} }
if (!cmd_ep) { if (!cmd_ep) {
dbg("cxacru_bind: no command endpoint"); usb_dbg(usbatm_instance, "cxacru_bind: no command endpoint\n");
ret = -ENODEV; ret = -ENODEV;
goto fail; goto fail;
} }
...@@ -1227,10 +1227,10 @@ static void cxacru_unbind(struct usbatm_data *usbatm_instance, ...@@ -1227,10 +1227,10 @@ static void cxacru_unbind(struct usbatm_data *usbatm_instance,
struct cxacru_data *instance = usbatm_instance->driver_data; struct cxacru_data *instance = usbatm_instance->driver_data;
int is_polling = 1; int is_polling = 1;
dbg("cxacru_unbind entered"); usb_dbg(usbatm_instance, "cxacru_unbind entered\n");
if (!instance) { if (!instance) {
dbg("cxacru_unbind: NULL instance!"); usb_dbg(usbatm_instance, "cxacru_unbind: NULL instance!\n");
return; return;
} }
......
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