Skip to contentSkip to conversation

RC-core ".driver_name"

DISCUSSION Antti Palosaari 2 participants 2 messages May 26, 2012 – May 27, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Is there any reason RC-core .driver_name should be set as a module name which registers remote?

http://lxr.free-electrons.com/source/drivers/media/rc/rc-main.c

I see .driver_name is passed to the hotplug:
if (dev->driver_name)

    ADD_HOTPLUG_VAR("DRV_NAME=%s", dev->driver_name);

ir-keytable command shows that name:

# ir-keytable
    Driver af9015, table rc-digitalnow-tinytwin

I would like to use set name same as the device name - not the driver name. And af9015 is not the module name, correct is IMHO dvb_usb_af9015.

regards
Antti

Signature · 1 line
http://palosaari.fi/
#1 lore raw

Em 26-05-2012 08:32, Antti Palosaari escreveu:

Quoted 9 lines

Is there any reason RC-core .driver_name should be set as a module name which registers remote?

http://lxr.free-electrons.com/source/drivers/media/rc/rc-main.c

I see .driver_name is passed to the hotplug:
if (dev->driver_name)

    ADD_HOTPLUG_VAR("DRV_NAME=%s", dev->driver_name);
Quoted 6 lines

ir-keytable command shows that name:

# ir-keytable
    Driver af9015, table rc-digitalnow-tinytwin

I would like to use set name same as the device name - not the driver name. And af9015 is not the module name, correct is IMHO dvb_usb_af9015.

The RC hot-plug logic was conceived to use 2 parameters to decide what's the right keytable to be loaded on userspace:
- an unique per-driver string;
- an unique per-board string.

On your above example, the per-driver string is "af9015", and the per-board one is "rc-digitalnow-tinytwin".

With those two strings, userspace can uniquely associate a keytable with the driver.

The ir-keytable tool also allows saying that everything on with "af9015" will use a certain keytable, with this syntax at /etc/rc_maps.cfg:

af9015 * ./keycodes/rc5_hauppauge

So, I don't see any reason to change.

Also, changing it will break userspace API, as an old ir-keytable won't properly handle the tables on a new Kernel. So, it is too late to change it.

Regards,
Mauro