From: Lars-Peter Clausen Date: Tue, 3 Jul 2012 16:49:35 +0000 (+0200) Subject: driver-core: Move kobj_to_dev from genhd.h to device.h X-Git-Tag: v3.6-rc1~99^2~14^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4232963757e62b3b97bbba07cb92c6d448f6f4b;p=pandora-kernel.git driver-core: Move kobj_to_dev from genhd.h to device.h This function is not really specific to the genhd layer and there are various re-implementations or open-coded variants of it all throughout the kernel. To avoid further duplications move the function to a more generic place. While moving also convert it from a macro to a inline function. Potential users of this function can be detected and converted using the following coccinelle patch: // @@ expression k; @@ -container_of(k, struct device, kobj) +kobj_to_dev(kobj) // Signed-off-by: Lars-Peter Clausen Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed