[media] media: rc-core: simplify logging in rc_register_device
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 29 Oct 2015 21:39:06 +0000 (19:39 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 19 Nov 2015 11:38:19 +0000 (09:38 -0200)
Simplify the logging.

I had some doubts about using the elvis operator as it's GNU extension.
However GNU extensions are explicitely allowed and this operator is
used at several places in the kernel code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/rc-main.c

index ea1008cf14a31b870ada96b417ae0004047e381b..784be5ebc7abc1107cee74d76837d2f51ececd73 100644 (file)
@@ -1420,10 +1420,8 @@ int rc_register_device(struct rc_dev *dev)
        dev->input_dev->rep[REP_PERIOD] = 125;
 
        path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
-       printk(KERN_INFO "%s: %s as %s\n",
-               dev_name(&dev->dev),
-               dev->input_name ? dev->input_name : "Unspecified device",
-               path ? path : "N/A");
+       dev_info(&dev->dev, "%s as %s\n",
+               dev->input_name ?: "Unspecified device", path ?: "N/A");
        kfree(path);
 
        if (dev->driver_type == RC_DRIVER_IR_RAW) {