static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
 {
        struct acpi_device *adev;
-       struct acpi_driver *driver;
        u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE;
        bool hotplug_event = false;
 
        if (!adev)
                goto err;
 
-       driver = adev->driver;
-       if (driver && driver->ops.notify &&
-           (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS))
-               driver->ops.notify(adev, type);
+       if (adev->dev.driver) {
+               struct acpi_driver *driver = to_acpi_driver(adev->dev.driver);
+
+               if (driver && driver->ops.notify &&
+                   (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS))
+                       driver->ops.notify(adev, type);
+       }
 
        if (!hotplug_event) {
                acpi_bus_put_acpi_device(adev);
 static void acpi_notify_device(acpi_handle handle, u32 event, void *data)
 {
        struct acpi_device *device = data;
+       struct acpi_driver *acpi_drv = to_acpi_driver(device->dev.driver);
 
-       device->driver->ops.notify(device, event);
+       acpi_drv->ops.notify(device, event);
 }
 
 static void acpi_notify_device_fixed(void *data)
        if (ret)
                return ret;
 
-       acpi_dev->driver = acpi_drv;
-
        pr_debug("Driver [%s] successfully bound to device [%s]\n",
                 acpi_drv->name, acpi_dev->pnp.bus_id);
 
                        if (acpi_drv->ops.remove)
                                acpi_drv->ops.remove(acpi_dev);
 
-                       acpi_dev->driver = NULL;
                        acpi_dev->driver_data = NULL;
                        return ret;
                }
 static void acpi_device_remove(struct device *dev)
 {
        struct acpi_device *acpi_dev = to_acpi_device(dev);
-       struct acpi_driver *acpi_drv = acpi_dev->driver;
+       struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
 
        if (acpi_drv->ops.notify)
                acpi_device_remove_notify_handler(acpi_dev);
        if (acpi_drv->ops.remove)
                acpi_drv->ops.remove(acpi_dev);
 
-       acpi_dev->driver = NULL;
        acpi_dev->driver_data = NULL;
 
        put_device(dev);