[media] lirc_dev: remove superfluous get/put_device() calls
authorDavid Härdeman <david@hardeman.nu>
Mon, 1 May 2017 16:04:26 +0000 (13:04 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Jun 2017 12:05:09 +0000 (09:05 -0300)
device_add() and friends already manage the references to the parent
device so these calls aren't necessary.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/lirc_dev.c

index ad288760b3c3076e45003a6e1cd8dd943f597910..c2cb5e18e45d4d28d5f6feebef22e02414253665 100644 (file)
@@ -69,8 +69,6 @@ static void lirc_release(struct device *ld)
 {
        struct irctl *ir = container_of(ld, struct irctl, dev);
 
-       put_device(ir->dev.parent);
-
        if (ir->buf_internal) {
                lirc_buffer_free(ir->buf);
                kfree(ir->buf);
@@ -230,8 +228,6 @@ int lirc_register_driver(struct lirc_driver *d)
 
        mutex_unlock(&lirc_dev_lock);
 
-       get_device(ir->dev.parent);
-
        dev_info(ir->d.dev, "lirc_dev: driver %s registered at minor = %d\n",
                 ir->d.name, ir->d.minor);