]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rc: ite-cir: Initialise ite_dev::rdev earlier
authorBen Hutchings <ben@decadent.org.uk>
Sun, 19 Aug 2012 22:32:27 +0000 (19:32 -0300)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:48:29 +0000 (03:48 +0100)
commita4d44b6bfa193d1b25d8fb72f6566c4556cad0d5
tree94782c7db98c2e5ac010a1b8d25d03bc3dbb2e84
parent2239182005cc209df395cae2316f4e6688642b8d
rc: ite-cir: Initialise ite_dev::rdev earlier

commit 4b961180ef275035b1538317ffd0e21e80e63e77 upstream.

ite_dev::rdev is currently initialised in ite_probe() after
rc_register_device() returns.  If a newly registered device is opened
quickly enough, we may enable interrupts and try to use ite_dev::rdev
before it has been initialised.  Move it up to the earliest point we
can, right after calling rc_allocate_device().

Reported-and-tested-by: YunQiang Su <wzssyqa@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/ite-cir.c