From 5be2b76a9ca4ea5fd3e221114d62eeb0d78267ca Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Mon, 1 May 2017 13:04:26 -0300 Subject: [PATCH] [media] lirc_dev: remove superfluous get/put_device() calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit device_add() and friends already manage the references to the parent device so these calls aren't necessary. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/lirc_dev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index ad28876..c2cb5e1 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -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); -- 2.7.4