Author: maks Date: Tue Jan 29 09:56:44 2008 New Revision: 10244 Log: add ppc vio compile fix
linus has not remerged the driver subsys tree, just push this compile fix for now. Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/ppc-vio_find_name-compile_fix.patch Modified: dists/trunk/linux-2.6/debian/patches/series/1~experimental.1 Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/ppc-vio_find_name-compile_fix.patch ============================================================================== --- (empty file) +++ dists/trunk/linux-2.6/debian/patches/bugfix/all/ppc-vio_find_name-compile_fix.patch Tue Jan 29 09:56:44 2008 @@ -0,0 +1,59 @@ +From: Paul Mackerras <[EMAIL PROTECTED]> +Date: Sun, 27 Jan 2008 00:45:30 +0000 (+1100) +Subject: PPC: Fix powerpc vio_find_name to not use devices_subsys +X-Git-Url: http://git.eu.kernel.org/?p=linux%2Fkernel%2Fgit%2Fgregkh%2Fdriver-2.6.git;a=commitdiff_plain;h=c847c853a5c562bac940c544748525d038167275 + +PPC: Fix powerpc vio_find_name to not use devices_subsys + +This fixes vio_find_name() in arch/powerpc/kernel/vio.c, which is +currently broken because it tries to use devices_subsys. That is bad +for two reasons: (1) it's doing (or trying to do) a scan of all +devices when it should only be scanning those on the vio bus, and +(2) devices_subsys was an internal symbol of the device system code +which was never meant for external use and has now gone away, and +thus the kernel fails to compile on pSeries. + +The new version uses bus_find_device_by_name() on the vio bus +(vio_bus_type). + +Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> +Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> +--- + +diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c +index 19a5656..f0bad70 100644 +--- a/arch/powerpc/kernel/vio.c ++++ b/arch/powerpc/kernel/vio.c +@@ -37,8 +37,6 @@ + #include <asm/iseries/hv_call_xm.h> + #include <asm/iseries/iommu.h> + +-extern struct kset devices_subsys; /* needed for vio_find_name() */ +- + static struct bus_type vio_bus_type; + + static struct vio_dev vio_bus_device = { /* fake "parent" device */ +@@ -361,19 +359,16 @@ EXPORT_SYMBOL(vio_get_attribute); + #ifdef CONFIG_PPC_PSERIES + /* vio_find_name() - internal because only vio.c knows how we formatted the + * kobject name +- * XXX once vio_bus_type.devices is actually used as a kset in +- * drivers/base/bus.c, this function should be removed in favor of +- * "device_find(kobj_name, &vio_bus_type)" + */ +-static struct vio_dev *vio_find_name(const char *kobj_name) ++static struct vio_dev *vio_find_name(const char *name) + { +- struct kobject *found; ++ struct device *found; + +- found = kset_find_obj(&devices_subsys, kobj_name); ++ found = bus_find_device_by_name(&vio_bus_type, NULL, name); + if (!found) + return NULL; + +- return to_vio_dev(container_of(found, struct device, kobj)); ++ return to_vio_dev(found); + } + + /** Modified: dists/trunk/linux-2.6/debian/patches/series/1~experimental.1 ============================================================================== --- dists/trunk/linux-2.6/debian/patches/series/1~experimental.1 (original) +++ dists/trunk/linux-2.6/debian/patches/series/1~experimental.1 Tue Jan 29 09:56:44 2008 @@ -42,3 +42,4 @@ + bugfix/all/fw-sbp2-skip-unnecessary-logout.patch + bugfix/all/fw-sbp2-try-increase-reconnect_hold.patch + bugfix/all/patch-2.6.24-git5 ++ bugfix/all/ppc-vio_find_name-compile_fix.patch _______________________________________________ Kernel-svn-changes mailing list Kernel-svn-changes@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes