mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
UPSTREAM: [media] lirc_dev: remove superfluous get/put_device() calls
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>
(cherry picked from commit 5be2b76a9c)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
committed by
Tao Huang
parent
4069db3424
commit
a28a9d94fe
@@ -73,8 +73,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);
|
||||
@@ -234,8 +232,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user