tunnels: fix netns vs proto registration ordering
[safe/jmp/linux-2.6] / drivers / pnp / driver.c
index 54673a4..cd11b11 100644 (file)
@@ -135,6 +135,15 @@ static int pnp_device_remove(struct device *dev)
        return 0;
 }
 
+static void pnp_device_shutdown(struct device *dev)
+{
+       struct pnp_dev *pnp_dev = to_pnp_dev(dev);
+       struct pnp_driver *drv = pnp_dev->driver;
+
+       if (drv && drv->shutdown)
+               drv->shutdown(pnp_dev);
+}
+
 static int pnp_bus_match(struct device *dev, struct device_driver *drv)
 {
        struct pnp_dev *pnp_dev = to_pnp_dev(dev);
@@ -203,8 +212,10 @@ struct bus_type pnp_bus_type = {
        .match   = pnp_bus_match,
        .probe   = pnp_device_probe,
        .remove  = pnp_device_remove,
+       .shutdown = pnp_device_shutdown,
        .suspend = pnp_bus_suspend,
        .resume  = pnp_bus_resume,
+       .dev_attrs = pnp_interface_attrs,
 };
 
 int pnp_register_driver(struct pnp_driver *drv)