Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[sfrench/cifs-2.6.git] / drivers / pnp / pnpbios / core.c
index f49674f07949bcf505632d3d4c842a7c4b542e50..81a6c83d89a644bb9400aef1ee2470f0a536784d 100644 (file)
@@ -56,7 +56,6 @@
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/slab.h>
-#include <linux/kobject_uevent.h>
 #include <linux/completion.h>
 #include <linux/spinlock.h>
 #include <linux/dmi.h>
@@ -106,8 +105,6 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
        char *argv [3], **envp, *buf, *scratch;
        int i = 0, value;
 
-       if (!hotplug_path [0])
-               return -ENOENT;
        if (!current->fs->root) {
                return -EAGAIN;
        }
@@ -119,8 +116,9 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
                return -ENOMEM;
        }
 
-       /* only one standardized param to hotplug command: type */
-       argv [0] = hotplug_path;
+       /* FIXME: if there are actual users of this, it should be integrated into
+        * the driver core and use the usual infrastructure like sysfs and uevents */
+       argv [0] = "/sbin/pnpbios";
        argv [1] = "dock";
        argv [2] = NULL;
 
@@ -348,7 +346,7 @@ static int insert_device(struct pnp_dev *dev, struct pnp_bios_node * node)
        dev->flags = node->flags;
        if (!(dev->flags & PNPBIOS_NO_CONFIG))
                dev->capabilities |= PNP_CONFIGURABLE;
-       if (!(dev->flags & PNPBIOS_NO_DISABLE))
+       if (!(dev->flags & PNPBIOS_NO_DISABLE) && pnpbios_is_dynamic(dev))
                dev->capabilities |= PNP_DISABLE;
        dev->capabilities |= PNP_READ;
        if (pnpbios_is_dynamic(dev))
@@ -528,6 +526,10 @@ static int __init pnpbios_init(void)
 {
        int ret;
 
+#if defined(CONFIG_PPC_MERGE)
+       if (check_legacy_ioport(PNPBIOS_BASE))
+               return -ENODEV;
+#endif
        if (pnpbios_disabled || dmi_check_system(pnpbios_dmi_table)) {
                printk(KERN_INFO "PnPBIOS: Disabled\n");
                return -ENODEV;
@@ -577,6 +579,10 @@ subsys_initcall(pnpbios_init);
 
 static int __init pnpbios_thread_init(void)
 {
+#if defined(CONFIG_PPC_MERGE)
+       if (check_legacy_ioport(PNPBIOS_BASE))
+               return 0;
+#endif
        if (pnpbios_disabled)
                return 0;
 #ifdef CONFIG_HOTPLUG