Merge branch 'for-next/driver'
This commit is contained in:
commit
4e1ac4a872
|
@ -328,7 +328,8 @@ static void efi_bus_remove(struct device_d *dev)
|
|||
struct efi_driver *efidrv = to_efi_driver(dev->driver);
|
||||
struct efi_device *efidev = to_efi_device(dev);
|
||||
|
||||
return efidrv->remove(efidev);
|
||||
if (efidrv->remove)
|
||||
efidrv->remove(efidev);
|
||||
}
|
||||
|
||||
struct bus_type efi_bus = {
|
||||
|
|
|
@ -85,14 +85,15 @@ int device_probe(struct device_d *dev)
|
|||
|
||||
pinctrl_select_state_default(dev);
|
||||
|
||||
list_add(&dev->active, &active);
|
||||
|
||||
ret = dev->bus->probe(dev);
|
||||
if (ret) {
|
||||
list_del(&dev->active);
|
||||
dev_err(dev, "probe failed: %s\n", strerror(-ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
list_add(&dev->active, &active);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -398,8 +399,8 @@ void devices_shutdown(void)
|
|||
struct device_d *dev;
|
||||
|
||||
list_for_each_entry(dev, &active, active) {
|
||||
if (dev->driver->remove)
|
||||
dev->driver->remove(dev);
|
||||
if (dev->bus->remove)
|
||||
dev->bus->remove(dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ static int platform_probe(struct device_d *dev)
|
|||
|
||||
static void platform_remove(struct device_d *dev)
|
||||
{
|
||||
dev->driver->remove(dev);
|
||||
if (dev->driver->remove)
|
||||
dev->driver->remove(dev);
|
||||
}
|
||||
|
||||
int platform_driver_register(struct driver_d *drv)
|
||||
|
|
|
@ -472,7 +472,8 @@ static int i2c_probe(struct device_d *dev)
|
|||
|
||||
static void i2c_remove(struct device_d *dev)
|
||||
{
|
||||
dev->driver->remove(dev);
|
||||
if (dev->driver->remove)
|
||||
dev->driver->remove(dev);
|
||||
}
|
||||
|
||||
struct bus_type i2c_bus = {
|
||||
|
|
|
@ -51,7 +51,8 @@ static void pci_remove(struct device_d *dev)
|
|||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct pci_driver *pdrv = to_pci_driver(dev->driver);
|
||||
|
||||
pdrv->remove(pdev);
|
||||
if (pdrv->remove)
|
||||
pdrv->remove(pdev);
|
||||
}
|
||||
|
||||
struct bus_type pci_bus = {
|
||||
|
|
|
@ -311,7 +311,8 @@ static int spi_probe(struct device_d *dev)
|
|||
|
||||
static void spi_remove(struct device_d *dev)
|
||||
{
|
||||
dev->driver->remove(dev);
|
||||
if (dev->driver->remove)
|
||||
dev->driver->remove(dev);
|
||||
}
|
||||
|
||||
struct bus_type spi_bus = {
|
||||
|
|
|
@ -392,7 +392,8 @@ static void w1_bus_remove(struct device_d *_dev)
|
|||
struct w1_driver *drv = to_w1_driver(_dev->driver);
|
||||
struct w1_device *dev = to_w1_device(_dev);
|
||||
|
||||
return drv->remove(dev);
|
||||
if (drv->remove)
|
||||
drv->remove(dev);
|
||||
}
|
||||
|
||||
struct bus_type w1_bustype= {
|
||||
|
|
Loading…
Reference in New Issue