summaryrefslogtreecommitdiffstats
path: root/drivers/w1/masters/ds2490.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1/masters/ds2490.c')
-rw-r--r--drivers/w1/masters/ds2490.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index 7404ad3062b7..1de6df87bfa3 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -206,7 +206,7 @@ static int ds_send_control_cmd(struct ds_device *dev, u16 value, u16 index)
err = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, dev->ep[EP_CONTROL]),
CONTROL_CMD, VENDOR, value, index, NULL, 0, 1000);
if (err < 0) {
- printk(KERN_ERR "Failed to send command control message %x.%x: err=%d.\n",
+ pr_err("Failed to send command control message %x.%x: err=%d.\n",
value, index, err);
return err;
}
@@ -221,7 +221,7 @@ static int ds_send_control_mode(struct ds_device *dev, u16 value, u16 index)
err = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, dev->ep[EP_CONTROL]),
MODE_CMD, VENDOR, value, index, NULL, 0, 1000);
if (err < 0) {
- printk(KERN_ERR "Failed to send mode control message %x.%x: err=%d.\n",
+ pr_err("Failed to send mode control message %x.%x: err=%d.\n",
value, index, err);
return err;
}
@@ -236,7 +236,7 @@ static int ds_send_control(struct ds_device *dev, u16 value, u16 index)
err = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, dev->ep[EP_CONTROL]),
COMM_CMD, VENDOR, value, index, NULL, 0, 1000);
if (err < 0) {
- printk(KERN_ERR "Failed to send control message %x.%x: err=%d.\n",
+ pr_err("Failed to send control message %x.%x: err=%d.\n",
value, index, err);
return err;
}
@@ -255,7 +255,8 @@ static int ds_recv_status_nodump(struct ds_device *dev, struct ds_status *st,
err = usb_interrupt_msg(dev->udev, usb_rcvintpipe(dev->udev,
dev->ep[EP_STATUS]), buf, size, &count, 100);
if (err < 0) {
- printk(KERN_ERR "Failed to read 1-wire data from 0x%x: err=%d.\n", dev->ep[EP_STATUS], err);
+ pr_err("Failed to read 1-wire data from 0x%x: err=%d.\n",
+ dev->ep[EP_STATUS], err);
return err;
}
@@ -267,17 +268,17 @@ static int ds_recv_status_nodump(struct ds_device *dev, struct ds_status *st,
static inline void ds_print_msg(unsigned char *buf, unsigned char *str, int off)
{
- printk(KERN_INFO "%45s: %8x\n", str, buf[off]);
+ pr_info("%45s: %8x\n", str, buf[off]);
}
static void ds_dump_status(struct ds_device *dev, unsigned char *buf, int count)
{
int i;
- printk(KERN_INFO "0x%x: count=%d, status: ", dev->ep[EP_STATUS], count);
+ pr_info("0x%x: count=%d, status: ", dev->ep[EP_STATUS], count);
for (i=0; i<count; ++i)
- printk("%02x ", buf[i]);
- printk(KERN_INFO "\n");
+ pr_info("%02x ", buf[i]);
+ pr_info("\n");
if (count >= 16) {
ds_print_msg(buf, "enable flag", 0);
@@ -305,21 +306,21 @@ static void ds_dump_status(struct ds_device *dev, unsigned char *buf, int count)
}
ds_print_msg(buf, "Result Register Value: ", i);
if (buf[i] & RR_NRS)
- printk(KERN_INFO "NRS: Reset no presence or ...\n");
+ pr_info("NRS: Reset no presence or ...\n");
if (buf[i] & RR_SH)
- printk(KERN_INFO "SH: short on reset or set path\n");
+ pr_info("SH: short on reset or set path\n");
if (buf[i] & RR_APP)
- printk(KERN_INFO "APP: alarming presence on reset\n");
+ pr_info("APP: alarming presence on reset\n");
if (buf[i] & RR_VPP)
- printk(KERN_INFO "VPP: 12V expected not seen\n");
+ pr_info("VPP: 12V expected not seen\n");
if (buf[i] & RR_CMP)
- printk(KERN_INFO "CMP: compare error\n");
+ pr_info("CMP: compare error\n");
if (buf[i] & RR_CRC)
- printk(KERN_INFO "CRC: CRC error detected\n");
+ pr_info("CRC: CRC error detected\n");
if (buf[i] & RR_RDP)
- printk(KERN_INFO "RDP: redirected page\n");
+ pr_info("RDP: redirected page\n");
if (buf[i] & RR_EOS)
- printk(KERN_INFO "EOS: end of search error\n");
+ pr_info("EOS: end of search error\n");
}
}
@@ -330,15 +331,13 @@ static void ds_reset_device(struct ds_device *dev)
* the strong pullup.
*/
if (ds_send_control_mode(dev, MOD_PULSE_EN, PULSE_SPUE))
- printk(KERN_ERR "ds_reset_device: "
- "Error allowing strong pullup\n");
+ pr_err("ds_reset_device: Error allowing strong pullup\n");
/* Chip strong pullup time was cleared. */
if (dev->spu_sleep) {
/* lower 4 bits are 0, see ds_set_pullup */
u8 del = dev->spu_sleep>>4;
if (ds_send_control(dev, COMM_SET_DURATION | COMM_IM, del))
- printk(KERN_ERR "ds_reset_device: "
- "Error setting duration\n");
+ pr_err("ds_reset_device: Error setting duration\n");
}
}
@@ -363,7 +362,7 @@ static int ds_recv_data(struct ds_device *dev, unsigned char *buf, int size)
u8 buf[ST_SIZE];
int count;
- printk(KERN_INFO "Clearing ep0x%x.\n", dev->ep[EP_DATA_IN]);
+ pr_info("Clearing ep0x%x.\n", dev->ep[EP_DATA_IN]);
usb_clear_halt(dev->udev, usb_rcvbulkpipe(dev->udev, dev->ep[EP_DATA_IN]));
count = ds_recv_status_nodump(dev, &st, buf, sizeof(buf));
@@ -391,7 +390,7 @@ static int ds_send_data(struct ds_device *dev, unsigned char *buf, int len)
count = 0;
err = usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, dev->ep[EP_DATA_OUT]), buf, len, &count, 1000);
if (err < 0) {
- printk(KERN_ERR "Failed to write 1-wire data to ep0x%x: "
+ pr_err("Failed to write 1-wire data to ep0x%x: "
"err=%d.\n", dev->ep[EP_DATA_OUT], err);
return err;
}
@@ -475,7 +474,7 @@ static int ds_wait_status(struct ds_device *dev, struct ds_status *st)
} while (!(st->status & ST_IDLE) && !(err < 0) && ++count < 100);
if (err >= 16 && st->status & ST_EPOF) {
- printk(KERN_INFO "Resetting device after ST_EPOF.\n");
+ pr_info("Resetting device after ST_EPOF.\n");
ds_reset_device(dev);
/* Always dump the device status. */
count = 101;
@@ -992,7 +991,7 @@ static int ds_probe(struct usb_interface *intf,
dev = kzalloc(sizeof(struct ds_device), GFP_KERNEL);
if (!dev) {
- printk(KERN_INFO "Failed to allocate new DS9490R structure.\n");
+ pr_info("Failed to allocate new DS9490R structure.\n");
return -ENOMEM;
}
dev->udev = usb_get_dev(udev);
@@ -1024,7 +1023,8 @@ static int ds_probe(struct usb_interface *intf,
iface_desc = &intf->altsetting[alt];
if (iface_desc->desc.bNumEndpoints != NUM_EP-1) {
- printk(KERN_INFO "Num endpoints=%d. It is not DS9490R.\n", iface_desc->desc.bNumEndpoints);
+ pr_info("Num endpoints=%d. It is not DS9490R.\n",
+ iface_desc->desc.bNumEndpoints);
err = -EINVAL;
goto err_out_clear;
}