diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-05 04:32:24 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-05 04:32:24 +0400 |
commit | 2521129a6d2fd8a81f99cf95055eddea3df914ff (patch) | |
tree | f8b7879979f656669ce31cbc247b97ae702291fb /drivers/w1/masters/ds2490.c | |
parent | 98a96f202203fecad65b44449077c695686ad4db (diff) | |
parent | 16eb2bfc65ef86d3ac6420d50ddc2c48f0023cee (diff) | |
download | linux-2521129a6d2fd8a81f99cf95055eddea3df914ff.tar.xz |
Merge tag 'char-misc-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char / misc driver patches from Greg KH:
"Here's the big driver misc / char pull request for 3.17-rc1.
Lots of things in here, the thunderbolt support for Apple laptops,
some other new drivers, testing fixes, and other good things. All
have been in linux-next for a long time"
* tag 'char-misc-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (119 commits)
misc: bh1780: Introduce the use of devm_kzalloc
Lattice ECP3 FPGA: Correct endianness
drivers/misc/ti-st: Load firmware from ti-connectivity directory.
dt-bindings: extcon: Add support for SM5502 MUIC device
extcon: sm5502: Change internal hardware switch according to cable type
extcon: sm5502: Detect cable state after completing platform booting
extcon: sm5502: Add support new SM5502 extcon device driver
extcon: arizona: Get MICVDD against extcon device
extcon: Remove unnecessary OOM messages
misc: vexpress: Fix sparse non static symbol warnings
mei: drop unused hw dependent fw status functions
misc: bh1770glc: Use managed functions
pcmcia: remove DEFINE_PCI_DEVICE_TABLE usage
misc: remove DEFINE_PCI_DEVICE_TABLE usage
ipack: Replace DEFINE_PCI_DEVICE_TABLE macro use
drivers/char/dsp56k.c: drop check for negativity of unsigned parameter
mei: fix return value on disconnect timeout
mei: don't schedule suspend in pm idle
mei: start disconnect request timer consistently
mei: reset client connection state on timeout
...
Diffstat (limited to 'drivers/w1/masters/ds2490.c')
-rw-r--r-- | drivers/w1/masters/ds2490.c | 50 |
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; } |