Commit 5c77dc40 authored by YAMANE Toshiaki's avatar YAMANE Toshiaki Committed by Mauro Carvalho Chehab

[media] staging/media: Use dev_ or pr_ printks in lirc/lirc_imon.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
and add pr_fmt.
Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent df4f07b5
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -205,12 +207,12 @@ static void deregister_from_lirc(struct imon_context *context) ...@@ -205,12 +207,12 @@ static void deregister_from_lirc(struct imon_context *context)
retval = lirc_unregister_driver(minor); retval = lirc_unregister_driver(minor);
if (retval) if (retval)
printk(KERN_ERR KBUILD_MODNAME dev_err(&context->usbdev->dev,
": %s: unable to deregister from lirc(%d)", ": %s: unable to deregister from lirc(%d)",
__func__, retval); __func__, retval);
else else
printk(KERN_INFO MOD_NAME ": Deregistered iMON driver " dev_info(&context->usbdev->dev,
"(minor:%d)\n", minor); "Deregistered iMON driver (minor:%d)\n", minor);
} }
...@@ -231,8 +233,7 @@ static int display_open(struct inode *inode, struct file *file) ...@@ -231,8 +233,7 @@ static int display_open(struct inode *inode, struct file *file)
subminor = iminor(inode); subminor = iminor(inode);
interface = usb_find_interface(&imon_driver, subminor); interface = usb_find_interface(&imon_driver, subminor);
if (!interface) { if (!interface) {
printk(KERN_ERR KBUILD_MODNAME pr_err("%s: could not find interface for minor %d\n",
": %s: could not find interface for minor %d\n",
__func__, subminor); __func__, subminor);
retval = -ENODEV; retval = -ENODEV;
goto exit; goto exit;
...@@ -282,8 +283,7 @@ static int display_close(struct inode *inode, struct file *file) ...@@ -282,8 +283,7 @@ static int display_close(struct inode *inode, struct file *file)
context = file->private_data; context = file->private_data;
if (!context) { if (!context) {
printk(KERN_ERR KBUILD_MODNAME pr_err("%s: no context for device\n", __func__);
"%s: no context for device\n", __func__);
return -ENODEV; return -ENODEV;
} }
...@@ -391,8 +391,7 @@ static ssize_t vfd_write(struct file *file, const char __user *buf, ...@@ -391,8 +391,7 @@ static ssize_t vfd_write(struct file *file, const char __user *buf,
context = file->private_data; context = file->private_data;
if (!context) { if (!context) {
printk(KERN_ERR KBUILD_MODNAME pr_err("%s: no context for device\n", __func__);
"%s: no context for device\n", __func__);
return -ENODEV; return -ENODEV;
} }
...@@ -521,8 +520,7 @@ static void ir_close(void *data) ...@@ -521,8 +520,7 @@ static void ir_close(void *data)
context = (struct imon_context *)data; context = (struct imon_context *)data;
if (!context) { if (!context) {
printk(KERN_ERR KBUILD_MODNAME pr_err("%s: no context for device\n", __func__);
"%s: no context for device\n", __func__);
return; return;
} }
...@@ -1009,7 +1007,7 @@ static void imon_disconnect(struct usb_interface *interface) ...@@ -1009,7 +1007,7 @@ static void imon_disconnect(struct usb_interface *interface)
mutex_unlock(&driver_lock); mutex_unlock(&driver_lock);
printk(KERN_INFO "%s: iMON device (intf%d) disconnected\n", dev_info(&interface->dev, "%s: iMON device (intf%d) disconnected\n",
__func__, ifnum); __func__, ifnum);
} }
......
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