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.3-rc1~48^2~559 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9105b8b200410383d0854bbe237ee385d7d33ba6;p=pandora-kernel.git [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 Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed