diff options
author | David Härdeman <david@hardeman.nu> | 2017-06-25 09:31:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2017-10-04 13:50:42 -0300 |
commit | c3c6dd750e0b8dcee0306b9c5a45708922debbbe (patch) | |
tree | abf9340cfba76d14ea5cdf413b86496c479d8bda /drivers/media/rc/ir-lirc-codec.c | |
parent | de226ec8a6ac10e65fcc689a28761c966986e6a6 (diff) | |
download | linux-c3c6dd750e0b8dcee0306b9c5a45708922debbbe.tar.bz2 |
[media] media: lirc_dev: remove support for manually specifying minor number
All users of lirc_register_driver() uses dynamic minor allocation,
therefore we can remove the ability to explicitly request a given number.
This changes the function prototype of lirc_unregister_driver() to also
take a struct lirc_driver pointer as the sole argument.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/rc/ir-lirc-codec.c')
-rw-r--r-- | drivers/media/rc/ir-lirc-codec.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index d2223c04e9ad..58bff7a75d5b 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c @@ -382,7 +382,6 @@ static int ir_lirc_register(struct rc_dev *dev) snprintf(drv->name, sizeof(drv->name), "ir-lirc-codec (%s)", dev->driver_name); - drv->minor = -1; drv->features = features; drv->data = &dev->raw->lirc; drv->rbuf = NULL; @@ -394,11 +393,9 @@ static int ir_lirc_register(struct rc_dev *dev) drv->rdev = dev; drv->owner = THIS_MODULE; - drv->minor = lirc_register_driver(drv); - if (drv->minor < 0) { - rc = -ENODEV; + rc = lirc_register_driver(drv); + if (rc < 0) goto out; - } dev->raw->lirc.drv = drv; dev->raw->lirc.dev = dev; @@ -413,7 +410,7 @@ static int ir_lirc_unregister(struct rc_dev *dev) { struct lirc_codec *lirc = &dev->raw->lirc; - lirc_unregister_driver(lirc->drv->minor); + lirc_unregister_driver(lirc->drv); kfree(lirc->drv); lirc->drv = NULL; |