media: pulse8-cec/rainshadow-cec: make adapter name unique
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 15 Jul 2017 21:47:40 +0000 (18:47 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 18 Jul 2017 16:00:52 +0000 (13:00 -0300)
The CEC adapter name used by the pulse8-cec and rainshadow-cec USB device drivers
was a fixed string, but it should be unique if you connect multiple of these devices
to the same computer.

Use dev_name(&serio->dev) instead, which make it unique again.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/pulse8-cec/pulse8-cec.c
drivers/media/usb/rainshadow-cec/rainshadow-cec.c

index c843070f24c13247f6de3c8a0c866895b815e178..e29d4323704679ac9794ec23850176a9dd1b6944 100644 (file)
@@ -656,7 +656,7 @@ static int pulse8_connect(struct serio *serio, struct serio_driver *drv)
 
        pulse8->serio = serio;
        pulse8->adap = cec_allocate_adapter(&pulse8_cec_adap_ops, pulse8,
-               "HDMI CEC", caps, 1);
+                                           dev_name(&serio->dev), caps, 1);
        err = PTR_ERR_OR_ZERO(pulse8->adap);
        if (err < 0)
                goto free_device;
index 65692576690f0cb732d4386e884a8a58f60ee83c..30bff4c48f9299c2ea4f08851d9cbad49bea6056 100644 (file)
@@ -323,7 +323,7 @@ static int rain_connect(struct serio *serio, struct serio_driver *drv)
 
        rain->serio = serio;
        rain->adap = cec_allocate_adapter(&rain_cec_adap_ops, rain,
-               "HDMI CEC", caps, 1);
+                                         dev_name(&serio->dev), caps, 1);
        err = PTR_ERR_OR_ZERO(rain->adap);
        if (err < 0)
                goto free_device;