staging: most: hdm-usb: convert pr_warn() to dev_warn()
authorEva Rachel Retuya <eraretuya@gmail.com>
Tue, 20 Sep 2016 03:09:05 +0000 (11:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2016 11:59:45 +0000 (13:59 +0200)
Replace pr_warn() call with its respective dev_warn() counterpart.
Semantic patch used to detect and apply the transformation:

@a@
identifier dev;
expression E;
@@

struct device *dev = E;
<+... when != dev == NULL
- pr_warn(
+ dev_warn(dev,
...);
...+>

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-usb/hdm_usb.c

index 9deb28c4cc6152d5bac4893fd54056d248cddd18..084bd000a53688b5456eaf05a881b3fd4f6e1080 100644 (file)
@@ -1267,8 +1267,8 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
                                  ep_desc->bEndpointAddress * 16,
                                  1);
                if (err < 0)
-                       pr_warn("DCI Sync for EP %02x failed",
-                               ep_desc->bEndpointAddress);
+                       dev_warn(dev, "DCI Sync for EP %02x failed",
+                                ep_desc->bEndpointAddress);
        }
        dev_notice(dev, "claimed gadget: Vendor=%4.4x ProdID=%4.4x Bus=%02x Device=%02x\n",
                   le16_to_cpu(usb_dev->descriptor.idVendor),