From: Sylwester Nawrocki Date: Wed, 12 Dec 2012 11:16:05 +0000 (-0300) Subject: [media] s5p-fimc: Change platform subdevs registration method X-Git-Tag: v3.9-rc1~93^2~136 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b43a6f3f517109c2912d82f7f666a84420689bc;p=pandora-kernel.git [media] s5p-fimc: Change platform subdevs registration method The previous method of registering platform entities into the main driver using driver_find() and then iterating over devices bound to a driver was racy and is being removed here. Nothing was preventing module from unloading during a call to try_module_get(driver->owner). Instead, we look up a device first and then check for its driver while holding device lock. The platform sub-devices are looked up and registered to the top level driver. When any sub-device is not yet initialized and ready the main driver's probe() will be deferred. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed