From: Ben Hutchings Date: Wed, 16 Nov 2011 04:49:41 +0000 (-0300) Subject: media: staging: lirc_serial: Fix init/exit order X-Git-Tag: v3.2.10~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06b267b55cddb826dca2cc3b5eacc4ca760696f3;p=pandora-kernel.git media: staging: lirc_serial: Fix init/exit order commit 9105b8b200410383d0854bbe237ee385d7d33ba6 upstream. 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 Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Nieder Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed