Commit 068d6c0f authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab

V4L/DVB (8293): sms1xxx: create printk macros

Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 1c11d546
This diff is collapsed.
...@@ -414,4 +414,9 @@ void smsdvb_unregister(void); ...@@ -414,4 +414,9 @@ void smsdvb_unregister(void);
int smsusb_register(void); int smsusb_register(void);
void smsusb_unregister(void); void smsusb_unregister(void);
#define sms_err(fmt, arg...) printk(KERN_ERR fmt, ##arg)
#define sms_info(fmt, arg...) printk(KERN_INFO fmt, ##arg)
#define sms_debug(fmt, arg...) printk(KERN_DEBUG fmt, ##arg)
#endif /* __smscoreapi_h__ */ #endif /* __smscoreapi_h__ */
...@@ -113,8 +113,8 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed) ...@@ -113,8 +113,8 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed)
container_of(feed->demux, struct smsdvb_client_t, demux); container_of(feed->demux, struct smsdvb_client_t, demux);
struct SmsMsgData_ST PidMsg; struct SmsMsgData_ST PidMsg;
printk(KERN_DEBUG "%s add pid %d(%x)\n", __func__, sms_debug("%s add pid %d(%x)\n", __func__,
feed->pid, feed->pid); feed->pid, feed->pid);
PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
PidMsg.xMsgHeader.msgDstId = HIF_TASK; PidMsg.xMsgHeader.msgDstId = HIF_TASK;
...@@ -133,8 +133,8 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed) ...@@ -133,8 +133,8 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed)
container_of(feed->demux, struct smsdvb_client_t, demux); container_of(feed->demux, struct smsdvb_client_t, demux);
struct SmsMsgData_ST PidMsg; struct SmsMsgData_ST PidMsg;
printk(KERN_DEBUG "%s remove pid %d(%x)\n", __func__, sms_debug("%s remove pid %d(%x)\n", __func__,
feed->pid, feed->pid); feed->pid, feed->pid);
PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID; PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
PidMsg.xMsgHeader.msgDstId = HIF_TASK; PidMsg.xMsgHeader.msgDstId = HIF_TASK;
...@@ -220,7 +220,7 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr) ...@@ -220,7 +220,7 @@ static int smsdvb_read_snr(struct dvb_frontend *fe, u16 *snr)
static int smsdvb_get_tune_settings(struct dvb_frontend *fe, static int smsdvb_get_tune_settings(struct dvb_frontend *fe,
struct dvb_frontend_tune_settings *tune) struct dvb_frontend_tune_settings *tune)
{ {
printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__);
tune->min_delay_ms = 400; tune->min_delay_ms = 400;
tune->step_size = 250000; tune->step_size = 250000;
...@@ -247,8 +247,8 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe, ...@@ -247,8 +247,8 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe,
Msg.Data[0] = fep->frequency; Msg.Data[0] = fep->frequency;
Msg.Data[2] = 12000000; Msg.Data[2] = 12000000;
printk(KERN_DEBUG "%s freq %d band %d\n", __func__, sms_debug("%s freq %d band %d\n", __func__,
fep->frequency, fep->u.ofdm.bandwidth); fep->frequency, fep->u.ofdm.bandwidth);
switch (fep->u.ofdm.bandwidth) { switch (fep->u.ofdm.bandwidth) {
case BANDWIDTH_8_MHZ: Msg.Data[1] = BW_8_MHZ; break; case BANDWIDTH_8_MHZ: Msg.Data[1] = BW_8_MHZ; break;
...@@ -268,7 +268,7 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe, ...@@ -268,7 +268,7 @@ static int smsdvb_get_frontend(struct dvb_frontend *fe,
struct smsdvb_client_t *client = struct smsdvb_client_t *client =
container_of(fe, struct smsdvb_client_t, frontend); container_of(fe, struct smsdvb_client_t, frontend);
printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__);
/* todo: */ /* todo: */
memcpy(fep, &client->fe_params, memcpy(fep, &client->fe_params,
...@@ -322,14 +322,14 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, ...@@ -322,14 +322,14 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
return 0; return 0;
if (smscore_get_device_mode(coredev) != 4) { if (smscore_get_device_mode(coredev) != 4) {
printk(KERN_ERR "%sSMS Device mode is not set for " sms_err("%sSMS Device mode is not set for "
"DVB operation.\n", __func__); "DVB operation.\n", __func__);
return 0; return 0;
} }
client = kzalloc(sizeof(struct smsdvb_client_t), GFP_KERNEL); client = kzalloc(sizeof(struct smsdvb_client_t), GFP_KERNEL);
if (!client) { if (!client) {
printk(KERN_INFO "%s kmalloc() failed\n", __func__); sms_info("%s kmalloc() failed\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -339,8 +339,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, ...@@ -339,8 +339,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
smscore_get_board_id(coredev))->name, smscore_get_board_id(coredev))->name,
THIS_MODULE, device, adapter_nr); THIS_MODULE, device, adapter_nr);
if (rc < 0) { if (rc < 0) {
printk(KERN_ERR "%s dvb_register_adapter() failed %d\n", sms_err("%s dvb_register_adapter() failed %d\n",
__func__, rc); __func__, rc);
goto adapter_error; goto adapter_error;
} }
...@@ -353,8 +353,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, ...@@ -353,8 +353,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
rc = dvb_dmx_init(&client->demux); rc = dvb_dmx_init(&client->demux);
if (rc < 0) { if (rc < 0) {
printk(KERN_ERR "%s dvb_dmx_init failed %d\n\n", sms_err("%s dvb_dmx_init failed %d\n\n",
__func__, rc); __func__, rc);
goto dvbdmx_error; goto dvbdmx_error;
} }
...@@ -365,8 +365,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, ...@@ -365,8 +365,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
rc = dvb_dmxdev_init(&client->dmxdev, &client->adapter); rc = dvb_dmxdev_init(&client->dmxdev, &client->adapter);
if (rc < 0) { if (rc < 0) {
printk(KERN_ERR "%s dvb_dmxdev_init failed %d\n", sms_err("%s dvb_dmxdev_init failed %d\n",
__func__, rc); __func__, rc);
goto dmxdev_error; goto dmxdev_error;
} }
...@@ -376,8 +376,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, ...@@ -376,8 +376,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
rc = dvb_register_frontend(&client->adapter, &client->frontend); rc = dvb_register_frontend(&client->adapter, &client->frontend);
if (rc < 0) { if (rc < 0) {
printk(KERN_ERR "%s frontend registration failed %d\n", sms_err("%s frontend registration failed %d\n",
__func__, rc); __func__, rc);
goto frontend_error; goto frontend_error;
} }
...@@ -389,8 +389,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, ...@@ -389,8 +389,8 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
rc = smscore_register_client(coredev, &params, &client->smsclient); rc = smscore_register_client(coredev, &params, &client->smsclient);
if (rc < 0) { if (rc < 0) {
printk(KERN_INFO "%s smscore_register_client() failed %d\n", sms_info("%s smscore_register_client() failed %d\n",
__func__, rc); __func__, rc);
goto client_error; goto client_error;
} }
...@@ -405,7 +405,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev, ...@@ -405,7 +405,7 @@ int smsdvb_hotplug(struct smscore_device_t *coredev,
kmutex_unlock(&g_smsdvb_clientslock); kmutex_unlock(&g_smsdvb_clientslock);
printk(KERN_INFO "%s success\n", __func__); sms_info("%s success\n", __func__);
return 0; return 0;
...@@ -435,7 +435,7 @@ int smsdvb_register(void) ...@@ -435,7 +435,7 @@ int smsdvb_register(void)
rc = smscore_register_hotplug(smsdvb_hotplug); rc = smscore_register_hotplug(smsdvb_hotplug);
printk(KERN_INFO "%s\n", __func__); sms_info("%s\n", __func__);
return rc; return rc;
} }
......
...@@ -60,8 +60,8 @@ void smsusb_onresponse(struct urb *urb) ...@@ -60,8 +60,8 @@ void smsusb_onresponse(struct urb *urb)
struct smsusb_device_t *dev = surb->dev; struct smsusb_device_t *dev = surb->dev;
if (urb->status < 0) { if (urb->status < 0) {
printk(KERN_INFO "%s error, urb status %d, %d bytes\n", sms_info("%s error, urb status %d, %d bytes\n",
__func__, urb->status, urb->actual_length); __func__, urb->status, urb->actual_length);
return; return;
} }
...@@ -81,12 +81,12 @@ void smsusb_onresponse(struct urb *urb) ...@@ -81,12 +81,12 @@ void smsusb_onresponse(struct urb *urb)
/* sanity check */ /* sanity check */
if (((int) phdr->msgLength + if (((int) phdr->msgLength +
surb->cb->offset) > urb->actual_length) { surb->cb->offset) > urb->actual_length) {
printk(KERN_INFO "%s: invalid " sms_info("%s: invalid response "
"response msglen %d offset %d " "msglen %d offset %d "
"size %d\n", __func__, "size %d\n", __func__,
phdr->msgLength, phdr->msgLength,
surb->cb->offset, surb->cb->offset,
urb->actual_length); urb->actual_length);
goto exit_and_resubmit; goto exit_and_resubmit;
} }
...@@ -100,9 +100,9 @@ void smsusb_onresponse(struct urb *urb) ...@@ -100,9 +100,9 @@ void smsusb_onresponse(struct urb *urb)
smscore_onresponse(dev->coredev, surb->cb); smscore_onresponse(dev->coredev, surb->cb);
surb->cb = NULL; surb->cb = NULL;
} else { } else {
printk(KERN_INFO "%s invalid response " sms_info("%s invalid response "
"msglen %d actual %d\n", __func__, "msglen %d actual %d\n", __func__,
phdr->msgLength, urb->actual_length); phdr->msgLength, urb->actual_length);
} }
} }
...@@ -115,8 +115,8 @@ int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb) ...@@ -115,8 +115,8 @@ int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb)
if (!surb->cb) { if (!surb->cb) {
surb->cb = smscore_getbuffer(dev->coredev); surb->cb = smscore_getbuffer(dev->coredev);
if (!surb->cb) { if (!surb->cb) {
printk(KERN_INFO "%s smscore_getbuffer(...) " sms_info("%s smscore_getbuffer(...) "
"returned NULL\n", __func__); "returned NULL\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
} }
...@@ -157,8 +157,8 @@ int smsusb_start_streaming(struct smsusb_device_t *dev) ...@@ -157,8 +157,8 @@ int smsusb_start_streaming(struct smsusb_device_t *dev)
for (i = 0; i < MAX_URBS; i++) { for (i = 0; i < MAX_URBS; i++) {
rc = smsusb_submit_urb(dev, &dev->surbs[i]); rc = smsusb_submit_urb(dev, &dev->surbs[i]);
if (rc < 0) { if (rc < 0) {
printk(KERN_INFO "%s smsusb_submit_urb(...) " sms_info("%s smsusb_submit_urb(...) "
"failed\n", __func__); "failed\n", __func__);
smsusb_stop_streaming(dev); smsusb_stop_streaming(dev);
break; break;
} }
...@@ -191,15 +191,15 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) ...@@ -191,15 +191,15 @@ int smsusb1_load_firmware(struct usb_device *udev, int id)
int rc, dummy; int rc, dummy;
if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) { if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) {
printk(KERN_INFO "%s invalid firmware id specified %d\n", sms_info("%s invalid firmware id specified %d\n",
__func__, id); __func__, id);
return -EINVAL; return -EINVAL;
} }
rc = request_firmware(&fw, smsusb1_fw_lkup[id], &udev->dev); rc = request_firmware(&fw, smsusb1_fw_lkup[id], &udev->dev);
if (rc < 0) { if (rc < 0) {
printk(KERN_INFO "%s failed to open \"%s\" mode %d\n", sms_info("%s failed to open \"%s\" mode %d\n",
__func__, smsusb1_fw_lkup[id], id); __func__, smsusb1_fw_lkup[id], id);
return rc; return rc;
} }
...@@ -210,12 +210,12 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) ...@@ -210,12 +210,12 @@ int smsusb1_load_firmware(struct usb_device *udev, int id)
rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2), rc = usb_bulk_msg(udev, usb_sndbulkpipe(udev, 2),
fw_buffer, fw->size, &dummy, 1000); fw_buffer, fw->size, &dummy, 1000);
printk(KERN_INFO "%s: sent %d(%d) bytes, rc %d\n", sms_info("%s: sent %d(%d) bytes, rc %d\n",
__func__, fw->size, dummy, rc); __func__, fw->size, dummy, rc);
kfree(fw_buffer); kfree(fw_buffer);
} else { } else {
printk(KERN_INFO "failed to allocate firmware buffer\n"); sms_info("failed to allocate firmware buffer\n");
rc = -ENOMEM; rc = -ENOMEM;
} }
...@@ -233,7 +233,7 @@ void smsusb1_detectmode(void *context, int *mode) ...@@ -233,7 +233,7 @@ void smsusb1_detectmode(void *context, int *mode)
if (!product_string) { if (!product_string) {
product_string = "none"; product_string = "none";
printk(KERN_ERR "%s product string not found\n", __func__); sms_err("%s product string not found\n", __func__);
} else if (strstr(product_string, "DVBH")) } else if (strstr(product_string, "DVBH"))
*mode = 1; *mode = 1;
else if (strstr(product_string, "BDA")) else if (strstr(product_string, "BDA"))
...@@ -243,7 +243,7 @@ void smsusb1_detectmode(void *context, int *mode) ...@@ -243,7 +243,7 @@ void smsusb1_detectmode(void *context, int *mode)
else if (strstr(product_string, "TDMB")) else if (strstr(product_string, "TDMB"))
*mode = 2; *mode = 2;
printk(KERN_INFO "%s: %d \"%s\"\n", __func__, *mode, product_string); sms_info("%s: %d \"%s\"\n", __func__, *mode, product_string);
} }
int smsusb1_setmode(void *context, int mode) int smsusb1_setmode(void *context, int mode)
...@@ -252,8 +252,8 @@ int smsusb1_setmode(void *context, int mode) ...@@ -252,8 +252,8 @@ int smsusb1_setmode(void *context, int mode)
sizeof(struct SmsMsgHdr_ST), 0 }; sizeof(struct SmsMsgHdr_ST), 0 };
if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) {
printk(KERN_INFO "%s invalid firmware id specified %d\n", sms_info("%s invalid firmware id specified %d\n",
__func__, mode); __func__, mode);
return -EINVAL; return -EINVAL;
} }
...@@ -274,7 +274,7 @@ void smsusb_term_device(struct usb_interface *intf) ...@@ -274,7 +274,7 @@ void smsusb_term_device(struct usb_interface *intf)
kfree(dev); kfree(dev);
printk(KERN_INFO "%s device %p destroyed\n", __func__, dev); sms_info("%s device %p destroyed\n", __func__, dev);
} }
usb_set_intfdata(intf, NULL); usb_set_intfdata(intf, NULL);
...@@ -290,8 +290,8 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) ...@@ -290,8 +290,8 @@ int smsusb_init_device(struct usb_interface *intf, int board_id)
/* create device object */ /* create device object */
dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL); dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL);
if (!dev) { if (!dev) {
printk(KERN_INFO "%s kzalloc(sizeof(struct smsusb_device_t) " sms_info("%s kzalloc(sizeof(struct smsusb_device_t) "
"failed\n", __func__); "failed\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -309,25 +309,25 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) ...@@ -309,25 +309,25 @@ int smsusb_init_device(struct usb_interface *intf, int board_id)
params.setmode_handler = smsusb1_setmode; params.setmode_handler = smsusb1_setmode;
params.detectmode_handler = smsusb1_detectmode; params.detectmode_handler = smsusb1_detectmode;
params.device_type = SMS_STELLAR; params.device_type = SMS_STELLAR;
printk(KERN_INFO "%s stellar device found\n", __func__); sms_info("%s stellar device found\n", __func__);
break; break;
default: default:
switch (board->type) { switch (board->type) {
case SMS_NOVA_A0: case SMS_NOVA_A0:
params.device_type = SMS_NOVA_A0; params.device_type = SMS_NOVA_A0;
printk(KERN_INFO "%s nova A0 found\n", __func__); sms_info("%s nova A0 found\n", __func__);
break; break;
case SMS_NOVA_B0: case SMS_NOVA_B0:
params.device_type = SMS_NOVA_B0; params.device_type = SMS_NOVA_B0;
printk(KERN_INFO "%s nova B0 found\n", __func__); sms_info("%s nova B0 found\n", __func__);
break; break;
case SMS_VEGA: case SMS_VEGA:
params.device_type = SMS_VEGA; params.device_type = SMS_VEGA;
printk(KERN_INFO "%s Vega found\n", __func__); sms_info("%s Vega found\n", __func__);
break; break;
default: default:
printk(KERN_ERR "%s Unspecified sms device type!\n", sms_err("%s Unspecified sms device type!\n",
__func__); __func__);
} }
dev->buffer_size = USB2_BUFFER_SIZE; dev->buffer_size = USB2_BUFFER_SIZE;
...@@ -350,8 +350,8 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) ...@@ -350,8 +350,8 @@ int smsusb_init_device(struct usb_interface *intf, int board_id)
/* register in smscore */ /* register in smscore */
rc = smscore_register_device(&params, &dev->coredev); rc = smscore_register_device(&params, &dev->coredev);
if (rc < 0) { if (rc < 0) {
printk(KERN_INFO "%s smscore_register_device(...) failed, " sms_info("%s smscore_register_device(...) failed, "
"rc %d\n", __func__, rc); "rc %d\n", __func__, rc);
smsusb_term_device(intf); smsusb_term_device(intf);
return rc; return rc;
} }
...@@ -364,24 +364,24 @@ int smsusb_init_device(struct usb_interface *intf, int board_id) ...@@ -364,24 +364,24 @@ int smsusb_init_device(struct usb_interface *intf, int board_id)
usb_init_urb(&dev->surbs[i].urb); usb_init_urb(&dev->surbs[i].urb);
} }
printk(KERN_INFO "%s smsusb_start_streaming(...).\n", __func__); sms_info("%s smsusb_start_streaming(...).\n", __func__);
rc = smsusb_start_streaming(dev); rc = smsusb_start_streaming(dev);
if (rc < 0) { if (rc < 0) {
printk(KERN_INFO "%s smsusb_start_streaming(...) failed\n", sms_info("%s smsusb_start_streaming(...) failed\n",
__func__); __func__);
smsusb_term_device(intf); smsusb_term_device(intf);
return rc; return rc;
} }
rc = smscore_start_device(dev->coredev); rc = smscore_start_device(dev->coredev);
if (rc < 0) { if (rc < 0) {
printk(KERN_INFO "%s smscore_start_device(...) failed\n", sms_info("%s smscore_start_device(...) failed\n",
__func__); __func__);
smsusb_term_device(intf); smsusb_term_device(intf);
return rc; return rc;
} }
printk(KERN_INFO "%s device %p created\n", __func__, dev); sms_info("%s device %p created\n", __func__, dev);
return rc; return rc;
} }
...@@ -399,36 +399,36 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -399,36 +399,36 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
rc = usb_set_interface( rc = usb_set_interface(
udev, intf->cur_altsetting->desc.bInterfaceNumber, 0); udev, intf->cur_altsetting->desc.bInterfaceNumber, 0);
if (rc < 0) { if (rc < 0) {
printk(KERN_INFO "%s usb_set_interface failed, " sms_info("%s usb_set_interface failed, "
"rc %d\n", __func__, rc); "rc %d\n", __func__, rc);
return rc; return rc;
} }
} }
printk(KERN_INFO "smsusb_probe %d\n", sms_info("smsusb_probe %d\n",
intf->cur_altsetting->desc.bInterfaceNumber); intf->cur_altsetting->desc.bInterfaceNumber);
for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++)
printk(KERN_INFO "endpoint %d %02x %02x %d\n", i, sms_info("endpoint %d %02x %02x %d\n", i,
intf->cur_altsetting->endpoint[i].desc.bEndpointAddress, intf->cur_altsetting->endpoint[i].desc.bEndpointAddress,
intf->cur_altsetting->endpoint[i].desc.bmAttributes, intf->cur_altsetting->endpoint[i].desc.bmAttributes,
intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize); intf->cur_altsetting->endpoint[i].desc.wMaxPacketSize);
if ((udev->actconfig->desc.bNumInterfaces == 2) && if ((udev->actconfig->desc.bNumInterfaces == 2) &&
(intf->cur_altsetting->desc.bInterfaceNumber == 0)) { (intf->cur_altsetting->desc.bInterfaceNumber == 0)) {
printk(KERN_INFO "rom interface 0 is not used\n"); sms_info("rom interface 0 is not used\n");
return -ENODEV; return -ENODEV;
} }
if (intf->cur_altsetting->desc.bInterfaceNumber == 1) { if (intf->cur_altsetting->desc.bInterfaceNumber == 1) {
snprintf(devpath, sizeof(devpath), "usb\\%d-%s", snprintf(devpath, sizeof(devpath), "usb\\%d-%s",
udev->bus->busnum, udev->devpath); udev->bus->busnum, udev->devpath);
printk(KERN_INFO "stellar device was found.\n"); sms_info("stellar device was found.\n");
return smsusb1_load_firmware( return smsusb1_load_firmware(
udev, smscore_registry_getmode(devpath)); udev, smscore_registry_getmode(devpath));
} }
rc = smsusb_init_device(intf, id->driver_info); rc = smsusb_init_device(intf, id->driver_info);
printk(KERN_INFO "%s rc %d\n", __func__, rc); sms_info("%s rc %d\n", __func__, rc);
return rc; return rc;
} }
...@@ -448,16 +448,16 @@ int smsusb_register(void) ...@@ -448,16 +448,16 @@ int smsusb_register(void)
{ {
int rc = usb_register(&smsusb_driver); int rc = usb_register(&smsusb_driver);
if (rc) if (rc)
printk(KERN_INFO "usb_register failed. Error number %d\n", rc); sms_info("usb_register failed. Error number %d\n", rc);
printk(KERN_INFO "%s\n", __func__); sms_info("%s\n", __func__);
return rc; return rc;
} }
void smsusb_unregister(void) void smsusb_unregister(void)
{ {
printk(KERN_DEBUG "%s\n", __func__); sms_debug("%s\n", __func__);
/* Regular USB Cleanup */ /* Regular USB Cleanup */
usb_deregister(&smsusb_driver); usb_deregister(&smsusb_driver);
} }
......
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