]> git.openfabrics.org - ~shefty/rdma-dev.git/commit
[media] staging: lirc_serial: Fix init/exit order
authorBen Hutchings <ben@decadent.org.uk>
Wed, 16 Nov 2011 04:49:41 +0000 (01:49 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 24 Nov 2011 20:16:40 +0000 (18:16 -0200)
commit9105b8b200410383d0854bbe237ee385d7d33ba6
treef03d48ed0f0f84204e319bdd13c3707238485601
parent37e22142891773fb883bbef435f2ebbb5670c0b0
[media] staging: lirc_serial: Fix init/exit order

Currently the module init function registers a platform_device and
only then allocates its IRQ and I/O region.  This allows allocation to
race with the device's suspend() function.  Instead, allocate
resources in the platform driver's probe() function and free them in
the remove() function.

The module exit function removes the platform device before the
character device that provides access to it.  Change it to reverse the
order of initialisation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/lirc/lirc_serial.c