md: allow reshape_position for md arrays to be set via sysfs
[powerpc.git] / drivers / pnp / core.c
index deed924..3e20b1c 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/errno.h>
+#include <linux/dma-mapping.h>
 
 #include "base.h"
 
@@ -22,6 +23,14 @@ static LIST_HEAD(pnp_protocols);
 LIST_HEAD(pnp_global);
 DEFINE_SPINLOCK(pnp_lock);
 
+/*
+ * ACPI or PNPBIOS should tell us about all platform devices, so we can
+ * skip some blind probes.  ISAPNP typically enumerates only plug-in ISA
+ * devices, not built-in things like COM ports.
+ */
+int pnp_platform_devices;
+EXPORT_SYMBOL(pnp_platform_devices);
+
 void *pnp_alloc(long size)
 {
        void *result;
@@ -114,6 +123,8 @@ int __pnp_add_device(struct pnp_dev *dev)
        int ret;
        pnp_fixup_device(dev);
        dev->dev.bus = &pnp_bus_type;
+       dev->dev.dma_mask = &dev->dma_mask;
+       dev->dma_mask = dev->dev.coherent_dma_mask = DMA_24BIT_MASK;
        dev->dev.release = &pnp_release_device;
        dev->status = PNP_READY;
        spin_lock(&pnp_lock);
@@ -158,13 +169,14 @@ void __pnp_remove_device(struct pnp_dev *dev)
  *
  * this function will free all mem used by dev
  */
-
+#if 0
 void pnp_remove_device(struct pnp_dev *dev)
 {
        if (!dev || dev->card)
                return;
        __pnp_remove_device(dev);
 }
+#endif  /*  0  */
 
 static int __init pnp_init(void)
 {
@@ -174,7 +186,9 @@ static int __init pnp_init(void)
 
 subsys_initcall(pnp_init);
 
+#if 0
 EXPORT_SYMBOL(pnp_register_protocol);
 EXPORT_SYMBOL(pnp_unregister_protocol);
 EXPORT_SYMBOL(pnp_add_device);
 EXPORT_SYMBOL(pnp_remove_device);
+#endif  /*  0  */