Merge tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Here is the big set of driver core patches for 5.15-rc1.

  These do change a number of different things across different
  subsystems, and because of that, there were 2 stable tags created that
  might have already come into your tree from different pulls that did
  the following

   - changed the bus remove callback to return void

   - sysfs iomem_get_mapping rework

  Other than those two things, there's only a few small things in here:

   - kernfs performance improvements for huge numbers of sysfs users at
     once

   - tiny api cleanups

   - other minor changes

  All of these have been in linux-next for a while with no reported
  problems, other than the before-mentioned merge issue"

* tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (33 commits)
  MAINTAINERS: Add dri-devel for component.[hc]
  driver core: platform: Remove platform_device_add_properties()
  ARM: tegra: paz00: Handle device properties with software node API
  bitmap: extend comment to bitmap_print_bitmask/list_to_buf
  drivers/base/node.c: use bin_attribute to break the size limitation of cpumap ABI
  topology: use bin_attribute to break the size limitation of cpumap ABI
  lib: test_bitmap: add bitmap_print_bitmask/list_to_buf test cases
  cpumask: introduce cpumap_print_list/bitmask_to_buf to support large bitmask and list
  sysfs: Rename struct bin_attribute member to f_mapping
  sysfs: Invoke iomem_get_mapping() from the sysfs open callback
  debugfs: Return error during {full/open}_proxy_open() on rmmod
  zorro: Drop useless (and hardly used) .driver member in struct zorro_dev
  zorro: Simplify remove callback
  sh: superhyway: Simplify check in remove callback
  nubus: Simplify check in remove callback
  nubus: Make struct nubus_driver::remove return void
  kernfs: dont call d_splice_alias() under kernfs node lock
  kernfs: use i_lock to protect concurrent inode updates
  kernfs: switch kernfs to use an rwsem
  kernfs: use VFS negative dentry caching
  ...
This commit is contained in:
Linus Torvalds
2021-09-01 08:44:42 -07:00
126 changed files with 731 additions and 514 deletions

View File

@@ -5725,6 +5725,11 @@ F: Documentation/admin-guide/blockdev/
F: drivers/block/drbd/ F: drivers/block/drbd/
F: lib/lru_cache.c F: lib/lru_cache.c
DRIVER COMPONENT FRAMEWORK
L: dri-devel@lists.freedesktop.org
F: drivers/base/component.c
F: include/linux/component.h
DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
R: "Rafael J. Wysocki" <rafael@kernel.org> R: "Rafael J. Wysocki" <rafael@kernel.org>

View File

@@ -834,14 +834,13 @@ static int locomo_bus_probe(struct device *dev)
return ret; return ret;
} }
static int locomo_bus_remove(struct device *dev) static void locomo_bus_remove(struct device *dev)
{ {
struct locomo_dev *ldev = LOCOMO_DEV(dev); struct locomo_dev *ldev = LOCOMO_DEV(dev);
struct locomo_driver *drv = LOCOMO_DRV(dev->driver); struct locomo_driver *drv = LOCOMO_DRV(dev->driver);
if (drv->remove) if (drv->remove)
drv->remove(ldev); drv->remove(ldev);
return 0;
} }
struct bus_type locomo_bus_type = { struct bus_type locomo_bus_type = {

View File

@@ -1356,15 +1356,13 @@ static int sa1111_bus_probe(struct device *dev)
return ret; return ret;
} }
static int sa1111_bus_remove(struct device *dev) static void sa1111_bus_remove(struct device *dev)
{ {
struct sa1111_dev *sadev = to_sa1111_device(dev); struct sa1111_dev *sadev = to_sa1111_device(dev);
struct sa1111_driver *drv = SA1111_DRV(dev->driver); struct sa1111_driver *drv = SA1111_DRV(dev->driver);
if (drv->remove) if (drv->remove)
drv->remove(sadev); drv->remove(sadev);
return 0;
} }
struct bus_type sa1111_bus_type = { struct bus_type sa1111_bus_type = {

View File

@@ -1052,7 +1052,7 @@ static int ecard_drv_probe(struct device *dev)
return ret; return ret;
} }
static int ecard_drv_remove(struct device *dev) static void ecard_drv_remove(struct device *dev)
{ {
struct expansion_card *ec = ECARD_DEV(dev); struct expansion_card *ec = ECARD_DEV(dev);
struct ecard_driver *drv = ECARD_DRV(dev->driver); struct ecard_driver *drv = ECARD_DRV(dev->driver);
@@ -1067,8 +1067,6 @@ static int ecard_drv_remove(struct device *dev)
ec->ops = &ecard_default_ops; ec->ops = &ecard_default_ops;
barrier(); barrier();
ec->irq_data = NULL; ec->irq_data = NULL;
return 0;
} }
/* /*

View File

@@ -36,7 +36,7 @@ static struct gpiod_lookup_table wifi_gpio_lookup = {
void __init tegra_paz00_wifikill_init(void) void __init tegra_paz00_wifikill_init(void)
{ {
platform_device_add_properties(&wifi_rfkill_device, wifi_rfkill_prop); device_create_managed_software_node(&wifi_rfkill_device.dev, wifi_rfkill_prop, NULL);
gpiod_add_lookup_table(&wifi_gpio_lookup); gpiod_add_lookup_table(&wifi_gpio_lookup);
platform_device_register(&wifi_rfkill_device); platform_device_register(&wifi_rfkill_device);
} }

View File

@@ -143,14 +143,13 @@ static int gio_device_probe(struct device *dev)
return error; return error;
} }
static int gio_device_remove(struct device *dev) static void gio_device_remove(struct device *dev)
{ {
struct gio_device *gio_dev = to_gio_device(dev); struct gio_device *gio_dev = to_gio_device(dev);
struct gio_driver *drv = to_gio_driver(dev->driver); struct gio_driver *drv = to_gio_driver(dev->driver);
if (dev->driver && drv->remove) if (dev->driver && drv->remove)
drv->remove(gio_dev); drv->remove(gio_dev);
return 0;
} }
static void gio_device_shutdown(struct device *dev) static void gio_device_shutdown(struct device *dev)

View File

@@ -133,14 +133,13 @@ static int parisc_driver_probe(struct device *dev)
return rc; return rc;
} }
static int __exit parisc_driver_remove(struct device *dev) static void __exit parisc_driver_remove(struct device *dev)
{ {
struct parisc_device *pa_dev = to_parisc_device(dev); struct parisc_device *pa_dev = to_parisc_device(dev);
struct parisc_driver *pa_drv = to_parisc_driver(dev->driver); struct parisc_driver *pa_drv = to_parisc_driver(dev->driver);
if (pa_drv->remove) if (pa_drv->remove)
pa_drv->remove(pa_dev); pa_drv->remove(pa_dev);
return 0;
} }

View File

@@ -381,7 +381,7 @@ static int ps3_system_bus_probe(struct device *_dev)
return result; return result;
} }
static int ps3_system_bus_remove(struct device *_dev) static void ps3_system_bus_remove(struct device *_dev)
{ {
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
struct ps3_system_bus_driver *drv; struct ps3_system_bus_driver *drv;
@@ -399,7 +399,6 @@ static int ps3_system_bus_remove(struct device *_dev)
__func__, __LINE__, drv->core.name); __func__, __LINE__, drv->core.name);
pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core)); pr_debug(" <- %s:%d: %s\n", __func__, __LINE__, dev_name(&dev->core));
return 0;
} }
static void ps3_system_bus_shutdown(struct device *_dev) static void ps3_system_bus_shutdown(struct device *_dev)

View File

@@ -366,14 +366,13 @@ static int ibmebus_bus_device_probe(struct device *dev)
return error; return error;
} }
static int ibmebus_bus_device_remove(struct device *dev) static void ibmebus_bus_device_remove(struct device *dev)
{ {
struct platform_device *of_dev = to_platform_device(dev); struct platform_device *of_dev = to_platform_device(dev);
struct platform_driver *drv = to_platform_driver(dev->driver); struct platform_driver *drv = to_platform_driver(dev->driver);
if (dev->driver && drv->remove) if (dev->driver && drv->remove)
drv->remove(of_dev); drv->remove(of_dev);
return 0;
} }
static void ibmebus_bus_device_shutdown(struct device *dev) static void ibmebus_bus_device_shutdown(struct device *dev)

View File

@@ -1257,7 +1257,7 @@ static int vio_bus_probe(struct device *dev)
} }
/* convert from struct device to struct vio_dev and pass to driver. */ /* convert from struct device to struct vio_dev and pass to driver. */
static int vio_bus_remove(struct device *dev) static void vio_bus_remove(struct device *dev)
{ {
struct vio_dev *viodev = to_vio_dev(dev); struct vio_dev *viodev = to_vio_dev(dev);
struct vio_driver *viodrv = to_vio_driver(dev->driver); struct vio_driver *viodrv = to_vio_driver(dev->driver);
@@ -1276,7 +1276,6 @@ static int vio_bus_remove(struct device *dev)
vio_cmo_bus_remove(viodev); vio_cmo_bus_remove(viodev);
put_device(devptr); put_device(devptr);
return 0;
} }
static void vio_bus_shutdown(struct device *dev) static void vio_bus_shutdown(struct device *dev)

View File

@@ -105,7 +105,7 @@ enum scm_event {SCM_CHANGE, SCM_AVAIL};
struct scm_driver { struct scm_driver {
struct device_driver drv; struct device_driver drv;
int (*probe) (struct scm_device *scmdev); int (*probe) (struct scm_device *scmdev);
int (*remove) (struct scm_device *scmdev); void (*remove) (struct scm_device *scmdev);
void (*notify) (struct scm_device *scmdev, enum scm_event event); void (*notify) (struct scm_device *scmdev, enum scm_event event);
void (*handler) (struct scm_device *scmdev, void *data, void (*handler) (struct scm_device *scmdev, void *data,
blk_status_t error); blk_status_t error);

View File

@@ -93,7 +93,7 @@ static int vio_device_probe(struct device *dev)
return drv->probe(vdev, id); return drv->probe(vdev, id);
} }
static int vio_device_remove(struct device *dev) static void vio_device_remove(struct device *dev)
{ {
struct vio_dev *vdev = to_vio_dev(dev); struct vio_dev *vdev = to_vio_dev(dev);
struct vio_driver *drv = to_vio_driver(dev->driver); struct vio_driver *drv = to_vio_driver(dev->driver);
@@ -107,8 +107,6 @@ static int vio_device_remove(struct device *dev)
drv->remove(vdev); drv->remove(vdev);
} }
return 0;
} }
static ssize_t devspec_show(struct device *dev, static ssize_t devspec_show(struct device *dev,

View File

@@ -1019,7 +1019,7 @@ static int acpi_device_probe(struct device *dev)
return 0; return 0;
} }
static int acpi_device_remove(struct device *dev) static void acpi_device_remove(struct device *dev)
{ {
struct acpi_device *acpi_dev = to_acpi_device(dev); struct acpi_device *acpi_dev = to_acpi_device(dev);
struct acpi_driver *acpi_drv = acpi_dev->driver; struct acpi_driver *acpi_drv = acpi_dev->driver;
@@ -1034,7 +1034,6 @@ static int acpi_device_remove(struct device *dev)
acpi_dev->driver_data = NULL; acpi_dev->driver_data = NULL;
put_device(dev); put_device(dev);
return 0;
} }
struct bus_type acpi_bus_type = { struct bus_type acpi_bus_type = {

View File

@@ -219,7 +219,7 @@ static int amba_probe(struct device *dev)
return ret; return ret;
} }
static int amba_remove(struct device *dev) static void amba_remove(struct device *dev)
{ {
struct amba_device *pcdev = to_amba_device(dev); struct amba_device *pcdev = to_amba_device(dev);
struct amba_driver *drv = to_amba_driver(dev->driver); struct amba_driver *drv = to_amba_driver(dev->driver);
@@ -236,8 +236,6 @@ static int amba_remove(struct device *dev)
amba_put_disable_pclk(pcdev); amba_put_disable_pclk(pcdev);
dev_pm_domain_detach(dev, true); dev_pm_domain_detach(dev, true);
return 0;
} }
static void amba_shutdown(struct device *dev) static void amba_shutdown(struct device *dev)

View File

@@ -79,7 +79,7 @@ static int auxiliary_bus_probe(struct device *dev)
return ret; return ret;
} }
static int auxiliary_bus_remove(struct device *dev) static void auxiliary_bus_remove(struct device *dev)
{ {
struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver); struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver);
struct auxiliary_device *auxdev = to_auxiliary_dev(dev); struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
@@ -87,8 +87,6 @@ static int auxiliary_bus_remove(struct device *dev)
if (auxdrv->remove) if (auxdrv->remove)
auxdrv->remove(auxdev); auxdrv->remove(auxdev);
dev_pm_domain_detach(dev, true); dev_pm_domain_detach(dev, true);
return 0;
} }
static void auxiliary_bus_shutdown(struct device *dev) static void auxiliary_bus_shutdown(struct device *dev)

View File

@@ -195,7 +195,7 @@ static ssize_t unbind_store(struct device_driver *drv, const char *buf,
bus_put(bus); bus_put(bus);
return err; return err;
} }
static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, S_IWUSR, NULL, unbind_store); static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, 0200, NULL, unbind_store);
/* /*
* Manually attach a device to a driver. * Manually attach a device to a driver.
@@ -221,7 +221,7 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf,
bus_put(bus); bus_put(bus);
return err; return err;
} }
static DRIVER_ATTR_IGNORE_LOCKDEP(bind, S_IWUSR, NULL, bind_store); static DRIVER_ATTR_IGNORE_LOCKDEP(bind, 0200, NULL, bind_store);
static ssize_t drivers_autoprobe_show(struct bus_type *bus, char *buf) static ssize_t drivers_autoprobe_show(struct bus_type *bus, char *buf)
{ {
@@ -767,7 +767,7 @@ static ssize_t bus_uevent_store(struct bus_type *bus,
* DEVICE_ATTR_WO(uevent), which would cause a clash with the with the store * DEVICE_ATTR_WO(uevent), which would cause a clash with the with the store
* function name. * function name.
*/ */
static struct bus_attribute bus_attr_uevent = __ATTR(uevent, S_IWUSR, NULL, static struct bus_attribute bus_attr_uevent = __ATTR(uevent, 0200, NULL,
bus_uevent_store); bus_uevent_store);
/** /**

View File

@@ -297,6 +297,7 @@ static void free_cache_attributes(unsigned int cpu)
kfree(per_cpu_cacheinfo(cpu)); kfree(per_cpu_cacheinfo(cpu));
per_cpu_cacheinfo(cpu) = NULL; per_cpu_cacheinfo(cpu) = NULL;
cache_leaves(cpu) = 0;
} }
int __weak init_cache_level(unsigned int cpu) int __weak init_cache_level(unsigned int cpu)

View File

@@ -388,7 +388,7 @@ int register_cpu(struct cpu *cpu, int num)
return 0; return 0;
} }
struct device *get_cpu_device(unsigned cpu) struct device *get_cpu_device(unsigned int cpu)
{ {
if (cpu < nr_cpu_ids && cpu_possible(cpu)) if (cpu < nr_cpu_ids && cpu_possible(cpu))
return per_cpu(cpu_sys_devices, cpu); return per_cpu(cpu_sys_devices, cpu);
@@ -484,7 +484,7 @@ static const struct attribute_group *cpu_root_attr_groups[] = {
NULL, NULL,
}; };
bool cpu_is_hotpluggable(unsigned cpu) bool cpu_is_hotpluggable(unsigned int cpu)
{ {
struct device *dev = get_cpu_device(cpu); struct device *dev = get_cpu_device(cpu);
return dev && container_of(dev, struct cpu, dev)->hotpluggable; return dev && container_of(dev, struct cpu, dev)->hotpluggable;

View File

@@ -580,7 +580,8 @@ re_probe:
goto probe_failed; goto probe_failed;
} }
if (driver_sysfs_add(dev)) { ret = driver_sysfs_add(dev);
if (ret) {
pr_err("%s: driver_sysfs_add(%s) failed\n", pr_err("%s: driver_sysfs_add(%s) failed\n",
__func__, dev_name(dev)); __func__, dev_name(dev));
goto probe_failed; goto probe_failed;
@@ -602,16 +603,19 @@ re_probe:
goto probe_failed; goto probe_failed;
} }
if (device_add_groups(dev, drv->dev_groups)) { ret = device_add_groups(dev, drv->dev_groups);
if (ret) {
dev_err(dev, "device_add_groups() failed\n"); dev_err(dev, "device_add_groups() failed\n");
goto dev_groups_failed; goto dev_groups_failed;
} }
if (dev_has_sync_state(dev) && if (dev_has_sync_state(dev)) {
device_create_file(dev, &dev_attr_state_synced)) { ret = device_create_file(dev, &dev_attr_state_synced);
if (ret) {
dev_err(dev, "state_synced sysfs add failed\n"); dev_err(dev, "state_synced sysfs add failed\n");
goto dev_sysfs_state_synced_failed; goto dev_sysfs_state_synced_failed;
} }
}
if (test_remove) { if (test_remove) {
test_remove = false; test_remove = false;

View File

@@ -165,7 +165,7 @@ static inline int fw_state_wait(struct fw_priv *fw_priv)
return __fw_state_wait_common(fw_priv, MAX_SCHEDULE_TIMEOUT); return __fw_state_wait_common(fw_priv, MAX_SCHEDULE_TIMEOUT);
} }
static int fw_cache_piggyback_on_request(const char *name); static void fw_cache_piggyback_on_request(struct fw_priv *fw_priv);
static struct fw_priv *__allocate_fw_priv(const char *fw_name, static struct fw_priv *__allocate_fw_priv(const char *fw_name,
struct firmware_cache *fwc, struct firmware_cache *fwc,
@@ -707,10 +707,8 @@ int assign_fw(struct firmware *fw, struct device *device)
* on request firmware. * on request firmware.
*/ */
if (!(fw_priv->opt_flags & FW_OPT_NOCACHE) && if (!(fw_priv->opt_flags & FW_OPT_NOCACHE) &&
fw_priv->fwc->state == FW_LOADER_START_CACHE) { fw_priv->fwc->state == FW_LOADER_START_CACHE)
if (fw_cache_piggyback_on_request(fw_priv->fw_name)) fw_cache_piggyback_on_request(fw_priv);
kref_get(&fw_priv->ref);
}
/* pass the pages buffer to driver at the last minute */ /* pass the pages buffer to driver at the last minute */
fw_set_page_data(fw_priv, fw); fw_set_page_data(fw_priv, fw);
@@ -1259,11 +1257,11 @@ static int __fw_entry_found(const char *name)
return 0; return 0;
} }
static int fw_cache_piggyback_on_request(const char *name) static void fw_cache_piggyback_on_request(struct fw_priv *fw_priv)
{ {
struct firmware_cache *fwc = &fw_cache; const char *name = fw_priv->fw_name;
struct firmware_cache *fwc = fw_priv->fwc;
struct fw_cache_entry *fce; struct fw_cache_entry *fce;
int ret = 0;
spin_lock(&fwc->name_lock); spin_lock(&fwc->name_lock);
if (__fw_entry_found(name)) if (__fw_entry_found(name))
@@ -1271,13 +1269,12 @@ static int fw_cache_piggyback_on_request(const char *name)
fce = alloc_fw_cache_entry(name); fce = alloc_fw_cache_entry(name);
if (fce) { if (fce) {
ret = 1;
list_add(&fce->list, &fwc->fw_names); list_add(&fce->list, &fwc->fw_names);
kref_get(&fw_priv->ref);
pr_debug("%s: fw: %s\n", __func__, name); pr_debug("%s: fw: %s\n", __func__, name);
} }
found: found:
spin_unlock(&fwc->name_lock); spin_unlock(&fwc->name_lock);
return ret;
} }
static void free_fw_cache_entry(struct fw_cache_entry *fce) static void free_fw_cache_entry(struct fw_cache_entry *fce)
@@ -1508,9 +1505,8 @@ static inline void unregister_fw_pm_ops(void)
unregister_pm_notifier(&fw_cache.pm_notify); unregister_pm_notifier(&fw_cache.pm_notify);
} }
#else #else
static int fw_cache_piggyback_on_request(const char *name) static void fw_cache_piggyback_on_request(struct fw_priv *fw_priv)
{ {
return 0;
} }
static inline int register_fw_pm_ops(void) static inline int register_fw_pm_ops(void)
{ {

View File

@@ -46,14 +46,12 @@ static int isa_bus_probe(struct device *dev)
return 0; return 0;
} }
static int isa_bus_remove(struct device *dev) static void isa_bus_remove(struct device *dev)
{ {
struct isa_driver *isa_driver = dev->platform_data; struct isa_driver *isa_driver = dev->platform_data;
if (isa_driver && isa_driver->remove) if (isa_driver && isa_driver->remove)
isa_driver->remove(dev, to_isa_dev(dev)->id); isa_driver->remove(dev, to_isa_dev(dev)->id);
return 0;
} }
static void isa_bus_shutdown(struct device *dev) static void isa_bus_shutdown(struct device *dev)

View File

@@ -33,9 +33,9 @@ int kobj_map(struct kobj_map *domain, dev_t dev, unsigned long range,
struct module *module, kobj_probe_t *probe, struct module *module, kobj_probe_t *probe,
int (*lock)(dev_t, void *), void *data) int (*lock)(dev_t, void *), void *data)
{ {
unsigned n = MAJOR(dev + range - 1) - MAJOR(dev) + 1; unsigned int n = MAJOR(dev + range - 1) - MAJOR(dev) + 1;
unsigned index = MAJOR(dev); unsigned int index = MAJOR(dev);
unsigned i; unsigned int i;
struct probe *p; struct probe *p;
if (n > 255) if (n > 255)
@@ -67,9 +67,9 @@ int kobj_map(struct kobj_map *domain, dev_t dev, unsigned long range,
void kobj_unmap(struct kobj_map *domain, dev_t dev, unsigned long range) void kobj_unmap(struct kobj_map *domain, dev_t dev, unsigned long range)
{ {
unsigned n = MAJOR(dev + range - 1) - MAJOR(dev) + 1; unsigned int n = MAJOR(dev + range - 1) - MAJOR(dev) + 1;
unsigned index = MAJOR(dev); unsigned int index = MAJOR(dev);
unsigned i; unsigned int i;
struct probe *found = NULL; struct probe *found = NULL;
if (n > 255) if (n > 255)

View File

@@ -26,43 +26,47 @@ static struct bus_type node_subsys = {
.dev_name = "node", .dev_name = "node",
}; };
static inline ssize_t cpumap_read(struct file *file, struct kobject *kobj,
static ssize_t node_read_cpumap(struct device *dev, bool list, char *buf) struct bin_attribute *attr, char *buf,
loff_t off, size_t count)
{ {
ssize_t n; struct device *dev = kobj_to_dev(kobj);
cpumask_var_t mask;
struct node *node_dev = to_node(dev); struct node *node_dev = to_node(dev);
cpumask_var_t mask;
/* 2008/04/07: buf currently PAGE_SIZE, need 9 chars per 32 bits. */ ssize_t n;
BUILD_BUG_ON((NR_CPUS/32 * 9) > (PAGE_SIZE-1));
if (!alloc_cpumask_var(&mask, GFP_KERNEL)) if (!alloc_cpumask_var(&mask, GFP_KERNEL))
return 0; return 0;
cpumask_and(mask, cpumask_of_node(node_dev->dev.id), cpu_online_mask); cpumask_and(mask, cpumask_of_node(node_dev->dev.id), cpu_online_mask);
n = cpumap_print_to_pagebuf(list, buf, mask); n = cpumap_print_bitmask_to_buf(buf, mask, off, count);
free_cpumask_var(mask); free_cpumask_var(mask);
return n; return n;
} }
static inline ssize_t cpumap_show(struct device *dev, static BIN_ATTR_RO(cpumap, 0);
struct device_attribute *attr,
char *buf) static inline ssize_t cpulist_read(struct file *file, struct kobject *kobj,
struct bin_attribute *attr, char *buf,
loff_t off, size_t count)
{ {
return node_read_cpumap(dev, false, buf); struct device *dev = kobj_to_dev(kobj);
struct node *node_dev = to_node(dev);
cpumask_var_t mask;
ssize_t n;
if (!alloc_cpumask_var(&mask, GFP_KERNEL))
return 0;
cpumask_and(mask, cpumask_of_node(node_dev->dev.id), cpu_online_mask);
n = cpumap_print_list_to_buf(buf, mask, off, count);
free_cpumask_var(mask);
return n;
} }
static DEVICE_ATTR_RO(cpumap); static BIN_ATTR_RO(cpulist, 0);
static inline ssize_t cpulist_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
return node_read_cpumap(dev, true, buf);
}
static DEVICE_ATTR_RO(cpulist);
/** /**
* struct node_access_nodes - Access class device to hold user visible * struct node_access_nodes - Access class device to hold user visible
@@ -75,7 +79,7 @@ static DEVICE_ATTR_RO(cpulist);
struct node_access_nodes { struct node_access_nodes {
struct device dev; struct device dev;
struct list_head list_node; struct list_head list_node;
unsigned access; unsigned int access;
#ifdef CONFIG_HMEM_REPORTING #ifdef CONFIG_HMEM_REPORTING
struct node_hmem_attrs hmem_attrs; struct node_hmem_attrs hmem_attrs;
#endif #endif
@@ -122,7 +126,7 @@ static void node_access_release(struct device *dev)
} }
static struct node_access_nodes *node_init_node_access(struct node *node, static struct node_access_nodes *node_init_node_access(struct node *node,
unsigned access) unsigned int access)
{ {
struct node_access_nodes *access_node; struct node_access_nodes *access_node;
struct device *dev; struct device *dev;
@@ -187,7 +191,7 @@ static struct attribute *access_attrs[] = {
* @access: The access class the for the given attributes * @access: The access class the for the given attributes
*/ */
void node_set_perf_attrs(unsigned int nid, struct node_hmem_attrs *hmem_attrs, void node_set_perf_attrs(unsigned int nid, struct node_hmem_attrs *hmem_attrs,
unsigned access) unsigned int access)
{ {
struct node_access_nodes *c; struct node_access_nodes *c;
struct node *node; struct node *node;
@@ -557,15 +561,28 @@ static ssize_t node_read_distance(struct device *dev,
static DEVICE_ATTR(distance, 0444, node_read_distance, NULL); static DEVICE_ATTR(distance, 0444, node_read_distance, NULL);
static struct attribute *node_dev_attrs[] = { static struct attribute *node_dev_attrs[] = {
&dev_attr_cpumap.attr,
&dev_attr_cpulist.attr,
&dev_attr_meminfo.attr, &dev_attr_meminfo.attr,
&dev_attr_numastat.attr, &dev_attr_numastat.attr,
&dev_attr_distance.attr, &dev_attr_distance.attr,
&dev_attr_vmstat.attr, &dev_attr_vmstat.attr,
NULL NULL
}; };
ATTRIBUTE_GROUPS(node_dev);
static struct bin_attribute *node_dev_bin_attrs[] = {
&bin_attr_cpumap,
&bin_attr_cpulist,
NULL
};
static const struct attribute_group node_dev_group = {
.attrs = node_dev_attrs,
.bin_attrs = node_dev_bin_attrs
};
static const struct attribute_group *node_dev_groups[] = {
&node_dev_group,
NULL
};
#ifdef CONFIG_HUGETLBFS #ifdef CONFIG_HUGETLBFS
/* /*
@@ -711,7 +728,7 @@ int register_cpu_under_node(unsigned int cpu, unsigned int nid)
*/ */
int register_memory_node_under_compute_node(unsigned int mem_nid, int register_memory_node_under_compute_node(unsigned int mem_nid,
unsigned int cpu_nid, unsigned int cpu_nid,
unsigned access) unsigned int access)
{ {
struct node *init_node, *targ_node; struct node *init_node, *targ_node;
struct node_access_nodes *initiator, *target; struct node_access_nodes *initiator, *target;

View File

@@ -641,22 +641,6 @@ int platform_device_add_data(struct platform_device *pdev, const void *data,
} }
EXPORT_SYMBOL_GPL(platform_device_add_data); EXPORT_SYMBOL_GPL(platform_device_add_data);
/**
* platform_device_add_properties - add built-in properties to a platform device
* @pdev: platform device to add properties to
* @properties: null terminated array of properties to add
*
* The function will take deep copy of @properties and attach the copy to the
* platform device. The memory associated with properties will be freed when the
* platform device is released.
*/
int platform_device_add_properties(struct platform_device *pdev,
const struct property_entry *properties)
{
return device_add_properties(&pdev->dev, properties);
}
EXPORT_SYMBOL_GPL(platform_device_add_properties);
/** /**
* platform_device_add - add a platform device to device hierarchy * platform_device_add - add a platform device to device hierarchy
* @pdev: platform device we're adding * @pdev: platform device we're adding
@@ -842,8 +826,8 @@ struct platform_device *platform_device_register_full(
goto err; goto err;
if (pdevinfo->properties) { if (pdevinfo->properties) {
ret = platform_device_add_properties(pdev, ret = device_create_managed_software_node(&pdev->dev,
pdevinfo->properties); pdevinfo->properties, NULL);
if (ret) if (ret)
goto err; goto err;
} }
@@ -1438,7 +1422,7 @@ out:
return ret; return ret;
} }
static int platform_remove(struct device *_dev) static void platform_remove(struct device *_dev)
{ {
struct platform_driver *drv = to_platform_driver(_dev->driver); struct platform_driver *drv = to_platform_driver(_dev->driver);
struct platform_device *dev = to_platform_device(_dev); struct platform_device *dev = to_platform_device(_dev);
@@ -1450,8 +1434,6 @@ static int platform_remove(struct device *_dev)
dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n"); dev_warn(_dev, "remove callback returned a non-zero value. This will be ignored.\n");
} }
dev_pm_domain_detach(_dev, true); dev_pm_domain_detach(_dev, true);
return 0;
} }
static void platform_shutdown(struct device *_dev) static void platform_shutdown(struct device *_dev)

View File

@@ -1180,7 +1180,7 @@ static const struct file_operations wakeup_sources_stats_fops = {
static int __init wakeup_sources_debugfs_init(void) static int __init wakeup_sources_debugfs_init(void)
{ {
debugfs_create_file("wakeup_sources", S_IRUGO, NULL, NULL, debugfs_create_file("wakeup_sources", 0444, NULL, NULL,
&wakeup_sources_stats_fops); &wakeup_sources_stats_fops);
return 0; return 0;
} }

View File

@@ -21,25 +21,27 @@ static ssize_t name##_show(struct device *dev, \
return sysfs_emit(buf, "%d\n", topology_##name(dev->id)); \ return sysfs_emit(buf, "%d\n", topology_##name(dev->id)); \
} }
#define define_siblings_show_map(name, mask) \ #define define_siblings_read_func(name, mask) \
static ssize_t name##_show(struct device *dev, \ static ssize_t name##_read(struct file *file, struct kobject *kobj, \
struct device_attribute *attr, char *buf) \ struct bin_attribute *attr, char *buf, \
loff_t off, size_t count) \
{ \ { \
return cpumap_print_to_pagebuf(false, buf, topology_##mask(dev->id));\ struct device *dev = kobj_to_dev(kobj); \
} \
return cpumap_print_bitmask_to_buf(buf, topology_##mask(dev->id), \
#define define_siblings_show_list(name, mask) \ off, count); \
static ssize_t name##_list_show(struct device *dev, \ } \
struct device_attribute *attr, \ \
char *buf) \ static ssize_t name##_list_read(struct file *file, struct kobject *kobj, \
struct bin_attribute *attr, char *buf, \
loff_t off, size_t count) \
{ \ { \
return cpumap_print_to_pagebuf(true, buf, topology_##mask(dev->id));\ struct device *dev = kobj_to_dev(kobj); \
\
return cpumap_print_list_to_buf(buf, topology_##mask(dev->id), \
off, count); \
} }
#define define_siblings_show_func(name, mask) \
define_siblings_show_map(name, mask); \
define_siblings_show_list(name, mask)
define_id_show_func(physical_package_id); define_id_show_func(physical_package_id);
static DEVICE_ATTR_RO(physical_package_id); static DEVICE_ATTR_RO(physical_package_id);
@@ -49,71 +51,80 @@ static DEVICE_ATTR_RO(die_id);
define_id_show_func(core_id); define_id_show_func(core_id);
static DEVICE_ATTR_RO(core_id); static DEVICE_ATTR_RO(core_id);
define_siblings_show_func(thread_siblings, sibling_cpumask); define_siblings_read_func(thread_siblings, sibling_cpumask);
static DEVICE_ATTR_RO(thread_siblings); static BIN_ATTR_RO(thread_siblings, 0);
static DEVICE_ATTR_RO(thread_siblings_list); static BIN_ATTR_RO(thread_siblings_list, 0);
define_siblings_show_func(core_cpus, sibling_cpumask); define_siblings_read_func(core_cpus, sibling_cpumask);
static DEVICE_ATTR_RO(core_cpus); static BIN_ATTR_RO(core_cpus, 0);
static DEVICE_ATTR_RO(core_cpus_list); static BIN_ATTR_RO(core_cpus_list, 0);
define_siblings_show_func(core_siblings, core_cpumask); define_siblings_read_func(core_siblings, core_cpumask);
static DEVICE_ATTR_RO(core_siblings); static BIN_ATTR_RO(core_siblings, 0);
static DEVICE_ATTR_RO(core_siblings_list); static BIN_ATTR_RO(core_siblings_list, 0);
define_siblings_show_func(die_cpus, die_cpumask); define_siblings_read_func(die_cpus, die_cpumask);
static DEVICE_ATTR_RO(die_cpus); static BIN_ATTR_RO(die_cpus, 0);
static DEVICE_ATTR_RO(die_cpus_list); static BIN_ATTR_RO(die_cpus_list, 0);
define_siblings_show_func(package_cpus, core_cpumask); define_siblings_read_func(package_cpus, core_cpumask);
static DEVICE_ATTR_RO(package_cpus); static BIN_ATTR_RO(package_cpus, 0);
static DEVICE_ATTR_RO(package_cpus_list); static BIN_ATTR_RO(package_cpus_list, 0);
#ifdef CONFIG_SCHED_BOOK #ifdef CONFIG_SCHED_BOOK
define_id_show_func(book_id); define_id_show_func(book_id);
static DEVICE_ATTR_RO(book_id); static DEVICE_ATTR_RO(book_id);
define_siblings_show_func(book_siblings, book_cpumask); define_siblings_read_func(book_siblings, book_cpumask);
static DEVICE_ATTR_RO(book_siblings); static BIN_ATTR_RO(book_siblings, 0);
static DEVICE_ATTR_RO(book_siblings_list); static BIN_ATTR_RO(book_siblings_list, 0);
#endif #endif
#ifdef CONFIG_SCHED_DRAWER #ifdef CONFIG_SCHED_DRAWER
define_id_show_func(drawer_id); define_id_show_func(drawer_id);
static DEVICE_ATTR_RO(drawer_id); static DEVICE_ATTR_RO(drawer_id);
define_siblings_show_func(drawer_siblings, drawer_cpumask); define_siblings_read_func(drawer_siblings, drawer_cpumask);
static DEVICE_ATTR_RO(drawer_siblings); static BIN_ATTR_RO(drawer_siblings, 0);
static DEVICE_ATTR_RO(drawer_siblings_list); static BIN_ATTR_RO(drawer_siblings_list, 0);
#endif #endif
static struct bin_attribute *bin_attrs[] = {
&bin_attr_core_cpus,
&bin_attr_core_cpus_list,
&bin_attr_thread_siblings,
&bin_attr_thread_siblings_list,
&bin_attr_core_siblings,
&bin_attr_core_siblings_list,
&bin_attr_die_cpus,
&bin_attr_die_cpus_list,
&bin_attr_package_cpus,
&bin_attr_package_cpus_list,
#ifdef CONFIG_SCHED_BOOK
&bin_attr_book_siblings,
&bin_attr_book_siblings_list,
#endif
#ifdef CONFIG_SCHED_DRAWER
&bin_attr_drawer_siblings,
&bin_attr_drawer_siblings_list,
#endif
NULL
};
static struct attribute *default_attrs[] = { static struct attribute *default_attrs[] = {
&dev_attr_physical_package_id.attr, &dev_attr_physical_package_id.attr,
&dev_attr_die_id.attr, &dev_attr_die_id.attr,
&dev_attr_core_id.attr, &dev_attr_core_id.attr,
&dev_attr_thread_siblings.attr,
&dev_attr_thread_siblings_list.attr,
&dev_attr_core_cpus.attr,
&dev_attr_core_cpus_list.attr,
&dev_attr_core_siblings.attr,
&dev_attr_core_siblings_list.attr,
&dev_attr_die_cpus.attr,
&dev_attr_die_cpus_list.attr,
&dev_attr_package_cpus.attr,
&dev_attr_package_cpus_list.attr,
#ifdef CONFIG_SCHED_BOOK #ifdef CONFIG_SCHED_BOOK
&dev_attr_book_id.attr, &dev_attr_book_id.attr,
&dev_attr_book_siblings.attr,
&dev_attr_book_siblings_list.attr,
#endif #endif
#ifdef CONFIG_SCHED_DRAWER #ifdef CONFIG_SCHED_DRAWER
&dev_attr_drawer_id.attr, &dev_attr_drawer_id.attr,
&dev_attr_drawer_siblings.attr,
&dev_attr_drawer_siblings_list.attr,
#endif #endif
NULL NULL
}; };
static const struct attribute_group topology_attr_group = { static const struct attribute_group topology_attr_group = {
.attrs = default_attrs, .attrs = default_attrs,
.bin_attrs = bin_attrs,
.name = "topology" .name = "topology"
}; };

View File

@@ -27,7 +27,7 @@ static DEFINE_MUTEX(bcma_buses_mutex);
static int bcma_bus_match(struct device *dev, struct device_driver *drv); static int bcma_bus_match(struct device *dev, struct device_driver *drv);
static int bcma_device_probe(struct device *dev); static int bcma_device_probe(struct device *dev);
static int bcma_device_remove(struct device *dev); static void bcma_device_remove(struct device *dev);
static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env); static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env);
static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf) static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf)
@@ -614,7 +614,7 @@ static int bcma_device_probe(struct device *dev)
return err; return err;
} }
static int bcma_device_remove(struct device *dev) static void bcma_device_remove(struct device *dev)
{ {
struct bcma_device *core = container_of(dev, struct bcma_device, dev); struct bcma_device *core = container_of(dev, struct bcma_device, dev);
struct bcma_driver *adrv = container_of(dev->driver, struct bcma_driver, struct bcma_driver *adrv = container_of(dev->driver, struct bcma_driver,
@@ -623,8 +623,6 @@ static int bcma_device_remove(struct device *dev)
if (adrv->remove) if (adrv->remove)
adrv->remove(core); adrv->remove(core);
put_device(dev); put_device(dev);
return 0;
} }
static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env) static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)

View File

@@ -169,13 +169,11 @@ static int sunxi_rsb_device_probe(struct device *dev)
return drv->probe(rdev); return drv->probe(rdev);
} }
static int sunxi_rsb_device_remove(struct device *dev) static void sunxi_rsb_device_remove(struct device *dev)
{ {
const struct sunxi_rsb_driver *drv = to_sunxi_rsb_driver(dev->driver); const struct sunxi_rsb_driver *drv = to_sunxi_rsb_driver(dev->driver);
drv->remove(to_sunxi_rsb_device(dev)); drv->remove(to_sunxi_rsb_device(dev));
return 0;
} }
static struct bus_type sunxi_rsb_bus = { static struct bus_type sunxi_rsb_bus = {

View File

@@ -1034,13 +1034,12 @@ static int cxl_bus_probe(struct device *dev)
return to_cxl_drv(dev->driver)->probe(dev); return to_cxl_drv(dev->driver)->probe(dev);
} }
static int cxl_bus_remove(struct device *dev) static void cxl_bus_remove(struct device *dev)
{ {
struct cxl_driver *cxl_drv = to_cxl_drv(dev->driver); struct cxl_driver *cxl_drv = to_cxl_drv(dev->driver);
if (cxl_drv->remove) if (cxl_drv->remove)
cxl_drv->remove(dev); cxl_drv->remove(dev);
return 0;
} }
struct bus_type cxl_bus_type = { struct bus_type cxl_bus_type = {

View File

@@ -172,15 +172,13 @@ static int dax_bus_probe(struct device *dev)
return 0; return 0;
} }
static int dax_bus_remove(struct device *dev) static void dax_bus_remove(struct device *dev)
{ {
struct dax_device_driver *dax_drv = to_dax_drv(dev->driver); struct dax_device_driver *dax_drv = to_dax_drv(dev->driver);
struct dev_dax *dev_dax = to_dev_dax(dev); struct dev_dax *dev_dax = to_dev_dax(dev);
if (dax_drv->remove) if (dax_drv->remove)
dax_drv->remove(dev_dax); dax_drv->remove(dev_dax);
return 0;
} }
static struct bus_type dax_bus_type = { static struct bus_type dax_bus_type = {

View File

@@ -260,7 +260,7 @@ static void disable_wq(struct idxd_wq *wq)
dev_info(dev, "wq %s disabled\n", dev_name(&wq->conf_dev)); dev_info(dev, "wq %s disabled\n", dev_name(&wq->conf_dev));
} }
static int idxd_config_bus_remove(struct device *dev) static void idxd_config_bus_remove(struct device *dev)
{ {
int rc; int rc;
@@ -305,8 +305,6 @@ static int idxd_config_bus_remove(struct device *dev)
dev_info(dev, "Device %s disabled\n", dev_name(dev)); dev_info(dev, "Device %s disabled\n", dev_name(dev));
} }
return 0;
} }
static void idxd_config_bus_shutdown(struct device *dev) static void idxd_config_bus_shutdown(struct device *dev)

View File

@@ -187,14 +187,12 @@ static int fw_unit_probe(struct device *dev)
return driver->probe(fw_unit(dev), unit_match(dev, dev->driver)); return driver->probe(fw_unit(dev), unit_match(dev, dev->driver));
} }
static int fw_unit_remove(struct device *dev) static void fw_unit_remove(struct device *dev)
{ {
struct fw_driver *driver = struct fw_driver *driver =
container_of(dev->driver, struct fw_driver, driver); container_of(dev->driver, struct fw_driver, driver);
driver->remove(fw_unit(dev)); driver->remove(fw_unit(dev));
return 0;
} }
static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size) static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)

View File

@@ -111,15 +111,13 @@ static int scmi_dev_probe(struct device *dev)
return scmi_drv->probe(scmi_dev); return scmi_drv->probe(scmi_dev);
} }
static int scmi_dev_remove(struct device *dev) static void scmi_dev_remove(struct device *dev)
{ {
struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver); struct scmi_driver *scmi_drv = to_scmi_driver(dev->driver);
struct scmi_device *scmi_dev = to_scmi_dev(dev); struct scmi_device *scmi_dev = to_scmi_dev(dev);
if (scmi_drv->remove) if (scmi_drv->remove)
scmi_drv->remove(scmi_dev); scmi_drv->remove(scmi_dev);
return 0;
} }
static struct bus_type scmi_bus_type = { static struct bus_type scmi_bus_type = {

View File

@@ -44,15 +44,13 @@ static int coreboot_bus_probe(struct device *dev)
return ret; return ret;
} }
static int coreboot_bus_remove(struct device *dev) static void coreboot_bus_remove(struct device *dev)
{ {
struct coreboot_device *device = CB_DEV(dev); struct coreboot_device *device = CB_DEV(dev);
struct coreboot_driver *driver = CB_DRV(dev->driver); struct coreboot_driver *driver = CB_DRV(dev->driver);
if (driver->remove) if (driver->remove)
driver->remove(device); driver->remove(device);
return 0;
} }
static struct bus_type coreboot_bus_type = { static struct bus_type coreboot_bus_type = {

View File

@@ -284,15 +284,13 @@ static int dfl_bus_probe(struct device *dev)
return ddrv->probe(ddev); return ddrv->probe(ddev);
} }
static int dfl_bus_remove(struct device *dev) static void dfl_bus_remove(struct device *dev)
{ {
struct dfl_driver *ddrv = to_dfl_drv(dev->driver); struct dfl_driver *ddrv = to_dfl_drv(dev->driver);
struct dfl_device *ddev = to_dfl_dev(dev); struct dfl_device *ddev = to_dfl_dev(dev);
if (ddrv->remove) if (ddrv->remove)
ddrv->remove(ddev); ddrv->remove(ddev);
return 0;
} }
static int dfl_bus_uevent(struct device *dev, struct kobj_uevent_env *env) static int dfl_bus_uevent(struct device *dev, struct kobj_uevent_env *env)

View File

@@ -2302,7 +2302,7 @@ end:
return ret; return ret;
} }
static int hid_device_remove(struct device *dev) static void hid_device_remove(struct device *dev)
{ {
struct hid_device *hdev = to_hid_device(dev); struct hid_device *hdev = to_hid_device(dev);
struct hid_driver *hdrv; struct hid_driver *hdrv;
@@ -2322,8 +2322,6 @@ static int hid_device_remove(struct device *dev)
if (!hdev->io_started) if (!hdev->io_started)
up(&hdev->driver_input_lock); up(&hdev->driver_input_lock);
return 0;
} }
static ssize_t modalias_show(struct device *dev, struct device_attribute *a, static ssize_t modalias_show(struct device *dev, struct device_attribute *a,

View File

@@ -255,7 +255,7 @@ static int ishtp_cl_bus_match(struct device *dev, struct device_driver *drv)
* *
* Return: Return value from driver remove() call. * Return: Return value from driver remove() call.
*/ */
static int ishtp_cl_device_remove(struct device *dev) static void ishtp_cl_device_remove(struct device *dev)
{ {
struct ishtp_cl_device *device = to_ishtp_cl_device(dev); struct ishtp_cl_device *device = to_ishtp_cl_device(dev);
struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver); struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver);
@@ -267,8 +267,6 @@ static int ishtp_cl_device_remove(struct device *dev)
if (driver->remove) if (driver->remove)
driver->remove(device); driver->remove(device);
return 0;
} }
/** /**

View File

@@ -922,7 +922,7 @@ static int vmbus_probe(struct device *child_device)
/* /*
* vmbus_remove - Remove a vmbus device * vmbus_remove - Remove a vmbus device
*/ */
static int vmbus_remove(struct device *child_device) static void vmbus_remove(struct device *child_device)
{ {
struct hv_driver *drv; struct hv_driver *drv;
struct hv_device *dev = device_to_hv_device(child_device); struct hv_device *dev = device_to_hv_device(child_device);
@@ -932,11 +932,8 @@ static int vmbus_remove(struct device *child_device)
if (drv->remove) if (drv->remove)
drv->remove(dev); drv->remove(dev);
} }
return 0;
} }
/* /*
* vmbus_shutdown - Shutdown a vmbus device * vmbus_shutdown - Shutdown a vmbus device
*/ */

View File

@@ -95,7 +95,7 @@ out_pm:
static void intel_th_device_remove(struct intel_th_device *thdev); static void intel_th_device_remove(struct intel_th_device *thdev);
static int intel_th_remove(struct device *dev) static void intel_th_remove(struct device *dev)
{ {
struct intel_th_driver *thdrv = to_intel_th_driver(dev->driver); struct intel_th_driver *thdrv = to_intel_th_driver(dev->driver);
struct intel_th_device *thdev = to_intel_th_device(dev); struct intel_th_device *thdev = to_intel_th_device(dev);
@@ -164,8 +164,6 @@ static int intel_th_remove(struct device *dev)
pm_runtime_disable(dev); pm_runtime_disable(dev);
pm_runtime_set_active(dev); pm_runtime_set_active(dev);
pm_runtime_enable(dev); pm_runtime_enable(dev);
return 0;
} }
static struct bus_type intel_th_bus = { static struct bus_type intel_th_bus = {

View File

@@ -601,7 +601,7 @@ put_sync_adapter:
return status; return status;
} }
static int i2c_device_remove(struct device *dev) static void i2c_device_remove(struct device *dev)
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
struct i2c_adapter *adap; struct i2c_adapter *adap;
@@ -631,9 +631,6 @@ static int i2c_device_remove(struct device *dev)
client->irq = 0; client->irq = 0;
if (client->flags & I2C_CLIENT_HOST_NOTIFY) if (client->flags & I2C_CLIENT_HOST_NOTIFY)
pm_runtime_put(&client->adapter->dev); pm_runtime_put(&client->adapter->dev);
/* return always 0 because there is WIP to make remove-functions void */
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP

View File

@@ -322,7 +322,7 @@ static int i3c_device_probe(struct device *dev)
return driver->probe(i3cdev); return driver->probe(i3cdev);
} }
static int i3c_device_remove(struct device *dev) static void i3c_device_remove(struct device *dev)
{ {
struct i3c_device *i3cdev = dev_to_i3cdev(dev); struct i3c_device *i3cdev = dev_to_i3cdev(dev);
struct i3c_driver *driver = drv_to_i3cdrv(dev->driver); struct i3c_driver *driver = drv_to_i3cdrv(dev->driver);
@@ -331,8 +331,6 @@ static int i3c_device_remove(struct device *dev)
driver->remove(i3cdev); driver->remove(i3cdev);
i3c_device_free_ibi(i3cdev); i3c_device_free_ibi(i3cdev);
return 0;
} }
struct bus_type i3c_bus_type = { struct bus_type i3c_bus_type = {

View File

@@ -697,13 +697,12 @@ static int gameport_driver_probe(struct device *dev)
return gameport->drv ? 0 : -ENODEV; return gameport->drv ? 0 : -ENODEV;
} }
static int gameport_driver_remove(struct device *dev) static void gameport_driver_remove(struct device *dev)
{ {
struct gameport *gameport = to_gameport_port(dev); struct gameport *gameport = to_gameport_port(dev);
struct gameport_driver *drv = to_gameport_driver(dev->driver); struct gameport_driver *drv = to_gameport_driver(dev->driver);
drv->disconnect(gameport); drv->disconnect(gameport);
return 0;
} }
static void gameport_attach_driver(struct gameport_driver *drv) static void gameport_attach_driver(struct gameport_driver *drv)

View File

@@ -778,12 +778,11 @@ static int serio_driver_probe(struct device *dev)
return serio_connect_driver(serio, drv); return serio_connect_driver(serio, drv);
} }
static int serio_driver_remove(struct device *dev) static void serio_driver_remove(struct device *dev)
{ {
struct serio *serio = to_serio_port(dev); struct serio *serio = to_serio_port(dev);
serio_disconnect_driver(serio); serio_disconnect_driver(serio);
return 0;
} }
static void serio_cleanup(struct serio *serio) static void serio_cleanup(struct serio *serio)

View File

@@ -67,15 +67,13 @@ static int ipack_bus_probe(struct device *device)
return drv->ops->probe(dev); return drv->ops->probe(dev);
} }
static int ipack_bus_remove(struct device *device) static void ipack_bus_remove(struct device *device)
{ {
struct ipack_device *dev = to_ipack_dev(device); struct ipack_device *dev = to_ipack_dev(device);
struct ipack_driver *drv = to_ipack_driver(device->driver); struct ipack_driver *drv = to_ipack_driver(device->driver);
if (drv->ops->remove) if (drv->ops->remove)
drv->ops->remove(dev); drv->ops->remove(dev);
return 0;
} }
static int ipack_uevent(struct device *dev, struct kobj_uevent_env *env) static int ipack_uevent(struct device *dev, struct kobj_uevent_env *env)

View File

@@ -88,7 +88,7 @@ static int macio_device_probe(struct device *dev)
return error; return error;
} }
static int macio_device_remove(struct device *dev) static void macio_device_remove(struct device *dev)
{ {
struct macio_dev * macio_dev = to_macio_device(dev); struct macio_dev * macio_dev = to_macio_device(dev);
struct macio_driver * drv = to_macio_driver(dev->driver); struct macio_driver * drv = to_macio_driver(dev->driver);
@@ -96,8 +96,6 @@ static int macio_device_remove(struct device *dev)
if (dev->driver && drv->remove) if (dev->driver && drv->remove)
drv->remove(macio_dev); drv->remove(macio_dev);
macio_dev_put(macio_dev); macio_dev_put(macio_dev);
return 0;
} }
static void macio_device_shutdown(struct device *dev) static void macio_device_shutdown(struct device *dev)

View File

@@ -77,7 +77,7 @@ static int mcb_probe(struct device *dev)
return ret; return ret;
} }
static int mcb_remove(struct device *dev) static void mcb_remove(struct device *dev)
{ {
struct mcb_driver *mdrv = to_mcb_driver(dev->driver); struct mcb_driver *mdrv = to_mcb_driver(dev->driver);
struct mcb_device *mdev = to_mcb_device(dev); struct mcb_device *mdev = to_mcb_device(dev);
@@ -89,8 +89,6 @@ static int mcb_remove(struct device *dev)
module_put(carrier_mod); module_put(carrier_mod);
put_device(&mdev->dev); put_device(&mdev->dev);
return 0;
} }
static void mcb_shutdown(struct device *dev) static void mcb_shutdown(struct device *dev)

View File

@@ -46,14 +46,13 @@ static int bttv_sub_probe(struct device *dev)
return sub->probe ? sub->probe(sdev) : -ENODEV; return sub->probe ? sub->probe(sdev) : -ENODEV;
} }
static int bttv_sub_remove(struct device *dev) static void bttv_sub_remove(struct device *dev)
{ {
struct bttv_sub_device *sdev = to_bttv_sub_dev(dev); struct bttv_sub_device *sdev = to_bttv_sub_dev(dev);
struct bttv_sub_driver *sub = to_bttv_sub_drv(dev->driver); struct bttv_sub_driver *sub = to_bttv_sub_drv(dev->driver);
if (sub->remove) if (sub->remove)
sub->remove(sdev); sub->remove(sdev);
return 0;
} }
struct bus_type bttv_sub_bus_type = { struct bus_type bttv_sub_bus_type = {

View File

@@ -91,7 +91,7 @@ static int memstick_device_probe(struct device *dev)
return rc; return rc;
} }
static int memstick_device_remove(struct device *dev) static void memstick_device_remove(struct device *dev)
{ {
struct memstick_dev *card = container_of(dev, struct memstick_dev, struct memstick_dev *card = container_of(dev, struct memstick_dev,
dev); dev);
@@ -105,7 +105,6 @@ static int memstick_device_remove(struct device *dev)
} }
put_device(dev); put_device(dev);
return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM

View File

@@ -33,13 +33,12 @@ static int mcp_bus_probe(struct device *dev)
return drv->probe(mcp); return drv->probe(mcp);
} }
static int mcp_bus_remove(struct device *dev) static void mcp_bus_remove(struct device *dev)
{ {
struct mcp *mcp = to_mcp(dev); struct mcp *mcp = to_mcp(dev);
struct mcp_driver *drv = to_mcp_driver(dev->driver); struct mcp_driver *drv = to_mcp_driver(dev->driver);
drv->remove(mcp); drv->remove(mcp);
return 0;
} }
static struct bus_type mcp_bus_type = { static struct bus_type mcp_bus_type = {

View File

@@ -884,7 +884,7 @@ static int mei_cl_device_probe(struct device *dev)
* *
* Return: 0 on success; < 0 otherwise * Return: 0 on success; < 0 otherwise
*/ */
static int mei_cl_device_remove(struct device *dev) static void mei_cl_device_remove(struct device *dev)
{ {
struct mei_cl_device *cldev = to_mei_cl_device(dev); struct mei_cl_device *cldev = to_mei_cl_device(dev);
struct mei_cl_driver *cldrv = to_mei_cl_driver(dev->driver); struct mei_cl_driver *cldrv = to_mei_cl_driver(dev->driver);
@@ -896,8 +896,6 @@ static int mei_cl_device_remove(struct device *dev)
mei_cl_bus_module_put(cldev); mei_cl_bus_module_put(cldev);
module_put(THIS_MODULE); module_put(THIS_MODULE);
return 0;
} }
static ssize_t name_show(struct device *dev, struct device_attribute *a, static ssize_t name_show(struct device *dev, struct device_attribute *a,

View File

@@ -87,7 +87,7 @@ static void tifm_dummy_event(struct tifm_dev *sock)
return; return;
} }
static int tifm_device_remove(struct device *dev) static void tifm_device_remove(struct device *dev)
{ {
struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev);
struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver, struct tifm_driver *drv = container_of(dev->driver, struct tifm_driver,
@@ -101,7 +101,6 @@ static int tifm_device_remove(struct device *dev)
} }
put_device(dev); put_device(dev);
return 0;
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM

View File

@@ -140,14 +140,12 @@ static int mmc_bus_probe(struct device *dev)
return drv->probe(card); return drv->probe(card);
} }
static int mmc_bus_remove(struct device *dev) static void mmc_bus_remove(struct device *dev)
{ {
struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_driver *drv = to_mmc_driver(dev->driver);
struct mmc_card *card = mmc_dev_to_card(dev); struct mmc_card *card = mmc_dev_to_card(dev);
drv->remove(card); drv->remove(card);
return 0;
} }
static void mmc_bus_shutdown(struct device *dev) static void mmc_bus_shutdown(struct device *dev)

View File

@@ -203,7 +203,7 @@ disable_runtimepm:
return ret; return ret;
} }
static int sdio_bus_remove(struct device *dev) static void sdio_bus_remove(struct device *dev)
{ {
struct sdio_driver *drv = to_sdio_driver(dev->driver); struct sdio_driver *drv = to_sdio_driver(dev->driver);
struct sdio_func *func = dev_to_sdio_func(dev); struct sdio_func *func = dev_to_sdio_func(dev);
@@ -232,8 +232,6 @@ static int sdio_bus_remove(struct device *dev)
pm_runtime_put_sync(dev); pm_runtime_put_sync(dev);
dev_pm_domain_detach(dev, false); dev_pm_domain_detach(dev, false);
return 0;
} }
static const struct dev_pm_ops sdio_bus_pm_ops = { static const struct dev_pm_ops sdio_bus_pm_ops = {

View File

@@ -428,13 +428,12 @@ out:
return err; return err;
} }
static int mac8390_device_remove(struct nubus_board *board) static void mac8390_device_remove(struct nubus_board *board)
{ {
struct net_device *dev = nubus_get_drvdata(board); struct net_device *dev = nubus_get_drvdata(board);
unregister_netdev(dev); unregister_netdev(dev);
free_netdev(dev); free_netdev(dev);
return 0;
} }
static struct nubus_driver mac8390_driver = { static struct nubus_driver mac8390_driver = {

View File

@@ -603,7 +603,7 @@ out:
return err; return err;
} }
static int mac_sonic_nubus_remove(struct nubus_board *board) static void mac_sonic_nubus_remove(struct nubus_board *board)
{ {
struct net_device *ndev = nubus_get_drvdata(board); struct net_device *ndev = nubus_get_drvdata(board);
struct sonic_local *lp = netdev_priv(ndev); struct sonic_local *lp = netdev_priv(ndev);
@@ -613,8 +613,6 @@ static int mac_sonic_nubus_remove(struct nubus_board *board)
SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode), SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
lp->descriptors, lp->descriptors_laddr); lp->descriptors, lp->descriptors_laddr);
free_netdev(ndev); free_netdev(ndev);
return 0;
} }
static struct nubus_driver mac_sonic_nubus_driver = { static struct nubus_driver mac_sonic_nubus_driver = {

View File

@@ -374,12 +374,11 @@ static int nsim_bus_probe(struct device *dev)
return nsim_dev_probe(nsim_bus_dev); return nsim_dev_probe(nsim_bus_dev);
} }
static int nsim_bus_remove(struct device *dev) static void nsim_bus_remove(struct device *dev)
{ {
struct nsim_bus_dev *nsim_bus_dev = to_nsim_bus_dev(dev); struct nsim_bus_dev *nsim_bus_dev = to_nsim_bus_dev(dev);
nsim_dev_remove(nsim_bus_dev); nsim_dev_remove(nsim_bus_dev);
return 0;
} }
static int nsim_num_vf(struct device *dev) static int nsim_num_vf(struct device *dev)

View File

@@ -271,7 +271,7 @@ static int ntb_probe(struct device *dev)
return rc; return rc;
} }
static int ntb_remove(struct device *dev) static void ntb_remove(struct device *dev)
{ {
struct ntb_dev *ntb; struct ntb_dev *ntb;
struct ntb_client *client; struct ntb_client *client;
@@ -283,8 +283,6 @@ static int ntb_remove(struct device *dev)
client->ops.remove(client, ntb); client->ops.remove(client, ntb);
put_device(dev); put_device(dev);
} }
return 0;
} }
static void ntb_dev_release(struct device *dev) static void ntb_dev_release(struct device *dev)

View File

@@ -304,7 +304,7 @@ static int ntb_transport_bus_probe(struct device *dev)
return rc; return rc;
} }
static int ntb_transport_bus_remove(struct device *dev) static void ntb_transport_bus_remove(struct device *dev)
{ {
const struct ntb_transport_client *client; const struct ntb_transport_client *client;
@@ -312,8 +312,6 @@ static int ntb_transport_bus_remove(struct device *dev)
client->remove(dev); client->remove(dev);
put_device(dev); put_device(dev);
return 0;
} }
static struct bus_type ntb_transport_bus = { static struct bus_type ntb_transport_bus = {

View File

@@ -29,14 +29,12 @@ static int nubus_device_probe(struct device *dev)
return err; return err;
} }
static int nubus_device_remove(struct device *dev) static void nubus_device_remove(struct device *dev)
{ {
struct nubus_driver *ndrv = to_nubus_driver(dev->driver); struct nubus_driver *ndrv = to_nubus_driver(dev->driver);
int err = -ENODEV;
if (dev->driver && ndrv->remove) if (ndrv->remove)
err = ndrv->remove(to_nubus_board(dev)); ndrv->remove(to_nubus_board(dev));
return err;
} }
struct bus_type nubus_bus_type = { struct bus_type nubus_bus_type = {

View File

@@ -108,7 +108,7 @@ static int nvdimm_bus_probe(struct device *dev)
return rc; return rc;
} }
static int nvdimm_bus_remove(struct device *dev) static void nvdimm_bus_remove(struct device *dev)
{ {
struct nd_device_driver *nd_drv = to_nd_device_driver(dev->driver); struct nd_device_driver *nd_drv = to_nd_device_driver(dev->driver);
struct module *provider = to_bus_provider(dev); struct module *provider = to_bus_provider(dev);
@@ -123,7 +123,6 @@ static int nvdimm_bus_remove(struct device *dev)
dev_dbg(&nvdimm_bus->dev, "%s.remove(%s)\n", dev->driver->name, dev_dbg(&nvdimm_bus->dev, "%s.remove(%s)\n", dev->driver->name,
dev_name(dev)); dev_name(dev));
module_put(provider); module_put(provider);
return 0;
} }
static void nvdimm_bus_shutdown(struct device *dev) static void nvdimm_bus_shutdown(struct device *dev)

View File

@@ -387,17 +387,14 @@ static int pci_epf_device_probe(struct device *dev)
return driver->probe(epf); return driver->probe(epf);
} }
static int pci_epf_device_remove(struct device *dev) static void pci_epf_device_remove(struct device *dev)
{ {
int ret = 0;
struct pci_epf *epf = to_pci_epf(dev); struct pci_epf *epf = to_pci_epf(dev);
struct pci_epf_driver *driver = to_pci_epf_driver(dev->driver); struct pci_epf_driver *driver = to_pci_epf_driver(dev->driver);
if (driver->remove) if (driver->remove)
ret = driver->remove(epf); driver->remove(epf);
epf->driver = NULL; epf->driver = NULL;
return ret;
} }
static struct bus_type pci_epf_bus_type = { static struct bus_type pci_epf_bus_type = {

View File

@@ -440,7 +440,7 @@ static int pci_device_probe(struct device *dev)
return error; return error;
} }
static int pci_device_remove(struct device *dev) static void pci_device_remove(struct device *dev)
{ {
struct pci_dev *pci_dev = to_pci_dev(dev); struct pci_dev *pci_dev = to_pci_dev(dev);
struct pci_driver *drv = pci_dev->driver; struct pci_driver *drv = pci_dev->driver;
@@ -476,7 +476,6 @@ static int pci_device_remove(struct device *dev)
*/ */
pci_dev_put(pci_dev); pci_dev_put(pci_dev);
return 0;
} }
static void pci_device_shutdown(struct device *dev) static void pci_device_shutdown(struct device *dev)

View File

@@ -965,7 +965,7 @@ void pci_create_legacy_files(struct pci_bus *b)
b->legacy_io->read = pci_read_legacy_io; b->legacy_io->read = pci_read_legacy_io;
b->legacy_io->write = pci_write_legacy_io; b->legacy_io->write = pci_write_legacy_io;
b->legacy_io->mmap = pci_mmap_legacy_io; b->legacy_io->mmap = pci_mmap_legacy_io;
b->legacy_io->mapping = iomem_get_mapping(); b->legacy_io->f_mapping = iomem_get_mapping;
pci_adjust_legacy_attr(b, pci_mmap_io); pci_adjust_legacy_attr(b, pci_mmap_io);
error = device_create_bin_file(&b->dev, b->legacy_io); error = device_create_bin_file(&b->dev, b->legacy_io);
if (error) if (error)
@@ -978,7 +978,7 @@ void pci_create_legacy_files(struct pci_bus *b)
b->legacy_mem->size = 1024*1024; b->legacy_mem->size = 1024*1024;
b->legacy_mem->attr.mode = 0600; b->legacy_mem->attr.mode = 0600;
b->legacy_mem->mmap = pci_mmap_legacy_mem; b->legacy_mem->mmap = pci_mmap_legacy_mem;
b->legacy_mem->mapping = iomem_get_mapping(); b->legacy_mem->f_mapping = iomem_get_mapping;
pci_adjust_legacy_attr(b, pci_mmap_mem); pci_adjust_legacy_attr(b, pci_mmap_mem);
error = device_create_bin_file(&b->dev, b->legacy_mem); error = device_create_bin_file(&b->dev, b->legacy_mem);
if (error) if (error)
@@ -1195,7 +1195,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
} }
} }
if (res_attr->mmap) if (res_attr->mmap)
res_attr->mapping = iomem_get_mapping(); res_attr->f_mapping = iomem_get_mapping;
res_attr->attr.name = res_attr_name; res_attr->attr.name = res_attr_name;
res_attr->attr.mode = 0600; res_attr->attr.mode = 0600;
res_attr->size = pci_resource_len(pdev, num); res_attr->size = pci_resource_len(pdev, num);

View File

@@ -350,7 +350,7 @@ static void pcmcia_card_remove(struct pcmcia_socket *s, struct pcmcia_device *le
return; return;
} }
static int pcmcia_device_remove(struct device *dev) static void pcmcia_device_remove(struct device *dev)
{ {
struct pcmcia_device *p_dev; struct pcmcia_device *p_dev;
struct pcmcia_driver *p_drv; struct pcmcia_driver *p_drv;
@@ -389,8 +389,6 @@ static int pcmcia_device_remove(struct device *dev)
/* references from pcmcia_device_probe */ /* references from pcmcia_device_probe */
pcmcia_put_dev(p_dev); pcmcia_put_dev(p_dev);
module_put(p_drv->owner); module_put(p_drv->owner);
return 0;
} }

View File

@@ -316,14 +316,12 @@ static int ssam_bus_probe(struct device *dev)
->probe(to_ssam_device(dev)); ->probe(to_ssam_device(dev));
} }
static int ssam_bus_remove(struct device *dev) static void ssam_bus_remove(struct device *dev)
{ {
struct ssam_device_driver *sdrv = to_ssam_device_driver(dev->driver); struct ssam_device_driver *sdrv = to_ssam_device_driver(dev->driver);
if (sdrv->remove) if (sdrv->remove)
sdrv->remove(to_ssam_device(dev)); sdrv->remove(to_ssam_device(dev));
return 0;
} }
struct bus_type ssam_bus_type = { struct bus_type ssam_bus_type = {

View File

@@ -980,7 +980,7 @@ probe_failure:
return ret; return ret;
} }
static int wmi_dev_remove(struct device *dev) static void wmi_dev_remove(struct device *dev)
{ {
struct wmi_block *wblock = dev_to_wblock(dev); struct wmi_block *wblock = dev_to_wblock(dev);
struct wmi_driver *wdriver = struct wmi_driver *wdriver =
@@ -997,8 +997,6 @@ static int wmi_dev_remove(struct device *dev)
if (ACPI_FAILURE(wmi_method_enable(wblock, 0))) if (ACPI_FAILURE(wmi_method_enable(wblock, 0)))
dev_warn(dev, "failed to disable device\n"); dev_warn(dev, "failed to disable device\n");
return 0;
} }
static struct class wmi_bus_class = { static struct class wmi_bus_class = {

View File

@@ -123,7 +123,7 @@ fail:
return error; return error;
} }
static int pnp_device_remove(struct device *dev) static void pnp_device_remove(struct device *dev)
{ {
struct pnp_dev *pnp_dev = to_pnp_dev(dev); struct pnp_dev *pnp_dev = to_pnp_dev(dev);
struct pnp_driver *drv = pnp_dev->driver; struct pnp_driver *drv = pnp_dev->driver;
@@ -139,7 +139,6 @@ static int pnp_device_remove(struct device *dev)
pnp_disable_dev(pnp_dev); pnp_disable_dev(pnp_dev);
pnp_device_detach(pnp_dev); pnp_device_detach(pnp_dev);
return 0;
} }
static void pnp_device_shutdown(struct device *dev) static void pnp_device_shutdown(struct device *dev)

View File

@@ -112,7 +112,7 @@ static int rio_device_probe(struct device *dev)
* driver, then run the driver remove() method. Then update * driver, then run the driver remove() method. Then update
* the reference count. * the reference count.
*/ */
static int rio_device_remove(struct device *dev) static void rio_device_remove(struct device *dev)
{ {
struct rio_dev *rdev = to_rio_dev(dev); struct rio_dev *rdev = to_rio_dev(dev);
struct rio_driver *rdrv = rdev->driver; struct rio_driver *rdrv = rdev->driver;
@@ -124,8 +124,6 @@ static int rio_device_remove(struct device *dev)
} }
rio_dev_put(rdev); rio_dev_put(rdev);
return 0;
} }
static void rio_device_shutdown(struct device *dev) static void rio_device_shutdown(struct device *dev)

View File

@@ -530,14 +530,13 @@ out:
return err; return err;
} }
static int rpmsg_dev_remove(struct device *dev) static void rpmsg_dev_remove(struct device *dev)
{ {
struct rpmsg_device *rpdev = to_rpmsg_device(dev); struct rpmsg_device *rpdev = to_rpmsg_device(dev);
struct rpmsg_driver *rpdrv = to_rpmsg_driver(rpdev->dev.driver); struct rpmsg_driver *rpdrv = to_rpmsg_driver(rpdev->dev.driver);
int err = 0;
if (rpdev->ops->announce_destroy) if (rpdev->ops->announce_destroy)
err = rpdev->ops->announce_destroy(rpdev); rpdev->ops->announce_destroy(rpdev);
if (rpdrv->remove) if (rpdrv->remove)
rpdrv->remove(rpdev); rpdrv->remove(rpdev);
@@ -546,8 +545,6 @@ static int rpmsg_dev_remove(struct device *dev)
if (rpdev->ept) if (rpdev->ept)
rpmsg_destroy_ept(rpdev->ept); rpmsg_destroy_ept(rpdev->ept);
return err;
} }
static struct bus_type rpmsg_bus = { static struct bus_type rpmsg_bus = {

View File

@@ -60,15 +60,13 @@ out:
return ret; return ret;
} }
static int scm_remove(struct scm_device *scmdev) static void scm_remove(struct scm_device *scmdev)
{ {
struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev); struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
scm_blk_dev_cleanup(bdev); scm_blk_dev_cleanup(bdev);
dev_set_drvdata(&scmdev->dev, NULL); dev_set_drvdata(&scmdev->dev, NULL);
kfree(bdev); kfree(bdev);
return 0;
} }
static struct scm_driver scm_drv = { static struct scm_driver scm_drv = {

View File

@@ -439,17 +439,13 @@ module_exit(cleanup_ccwgroup);
/************************** driver stuff ******************************/ /************************** driver stuff ******************************/
static int ccwgroup_remove(struct device *dev) static void ccwgroup_remove(struct device *dev)
{ {
struct ccwgroup_device *gdev = to_ccwgroupdev(dev); struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
struct ccwgroup_driver *gdrv = to_ccwgroupdrv(dev->driver); struct ccwgroup_driver *gdrv = to_ccwgroupdrv(dev->driver);
if (!dev->driver)
return 0;
if (gdrv->remove) if (gdrv->remove)
gdrv->remove(gdev); gdrv->remove(gdev);
return 0;
} }
static void ccwgroup_shutdown(struct device *dev) static void ccwgroup_shutdown(struct device *dev)

View File

@@ -100,7 +100,7 @@ static int chsc_subchannel_probe(struct subchannel *sch)
return ret; return ret;
} }
static int chsc_subchannel_remove(struct subchannel *sch) static void chsc_subchannel_remove(struct subchannel *sch)
{ {
struct chsc_private *private; struct chsc_private *private;
@@ -112,7 +112,6 @@ static int chsc_subchannel_remove(struct subchannel *sch)
put_device(&sch->dev); put_device(&sch->dev);
} }
kfree(private); kfree(private);
return 0;
} }
static void chsc_subchannel_shutdown(struct subchannel *sch) static void chsc_subchannel_shutdown(struct subchannel *sch)

View File

@@ -1401,15 +1401,14 @@ static int css_probe(struct device *dev)
return ret; return ret;
} }
static int css_remove(struct device *dev) static void css_remove(struct device *dev)
{ {
struct subchannel *sch; struct subchannel *sch;
int ret;
sch = to_subchannel(dev); sch = to_subchannel(dev);
ret = sch->driver->remove ? sch->driver->remove(sch) : 0; if (sch->driver->remove)
sch->driver->remove(sch);
sch->driver = NULL; sch->driver = NULL;
return ret;
} }
static void css_shutdown(struct device *dev) static void css_shutdown(struct device *dev)

View File

@@ -81,7 +81,7 @@ struct css_driver {
int (*chp_event)(struct subchannel *, struct chp_link *, int); int (*chp_event)(struct subchannel *, struct chp_link *, int);
int (*sch_event)(struct subchannel *, int); int (*sch_event)(struct subchannel *, int);
int (*probe)(struct subchannel *); int (*probe)(struct subchannel *);
int (*remove)(struct subchannel *); void (*remove)(struct subchannel *);
void (*shutdown)(struct subchannel *); void (*shutdown)(struct subchannel *);
int (*settle)(void); int (*settle)(void);
}; };

View File

@@ -137,7 +137,7 @@ static int ccw_uevent(struct device *dev, struct kobj_uevent_env *env)
static void io_subchannel_irq(struct subchannel *); static void io_subchannel_irq(struct subchannel *);
static int io_subchannel_probe(struct subchannel *); static int io_subchannel_probe(struct subchannel *);
static int io_subchannel_remove(struct subchannel *); static void io_subchannel_remove(struct subchannel *);
static void io_subchannel_shutdown(struct subchannel *); static void io_subchannel_shutdown(struct subchannel *);
static int io_subchannel_sch_event(struct subchannel *, int); static int io_subchannel_sch_event(struct subchannel *, int);
static int io_subchannel_chp_event(struct subchannel *, struct chp_link *, static int io_subchannel_chp_event(struct subchannel *, struct chp_link *,
@@ -1101,7 +1101,7 @@ out_schedule:
return 0; return 0;
} }
static int io_subchannel_remove(struct subchannel *sch) static void io_subchannel_remove(struct subchannel *sch)
{ {
struct io_subchannel_private *io_priv = to_io_private(sch); struct io_subchannel_private *io_priv = to_io_private(sch);
struct ccw_device *cdev; struct ccw_device *cdev;
@@ -1120,7 +1120,6 @@ out_free:
io_priv->dma_area, io_priv->dma_area_dma); io_priv->dma_area, io_priv->dma_area_dma);
kfree(io_priv); kfree(io_priv);
sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group); sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group);
return 0;
} }
static void io_subchannel_verify(struct subchannel *sch) static void io_subchannel_verify(struct subchannel *sch)
@@ -1742,7 +1741,7 @@ ccw_device_probe (struct device *dev)
return 0; return 0;
} }
static int ccw_device_remove(struct device *dev) static void ccw_device_remove(struct device *dev)
{ {
struct ccw_device *cdev = to_ccwdev(dev); struct ccw_device *cdev = to_ccwdev(dev);
struct ccw_driver *cdrv = cdev->drv; struct ccw_driver *cdrv = cdev->drv;
@@ -1776,8 +1775,6 @@ static int ccw_device_remove(struct device *dev)
spin_unlock_irq(cdev->ccwlock); spin_unlock_irq(cdev->ccwlock);
io_subchannel_quiesce(sch); io_subchannel_quiesce(sch);
__disable_cmf(cdev); __disable_cmf(cdev);
return 0;
} }
static void ccw_device_shutdown(struct device *dev) static void ccw_device_shutdown(struct device *dev)

View File

@@ -282,7 +282,7 @@ disable:
spin_unlock_irq(sch->lock); spin_unlock_irq(sch->lock);
} }
static int eadm_subchannel_remove(struct subchannel *sch) static void eadm_subchannel_remove(struct subchannel *sch)
{ {
struct eadm_private *private = get_eadm_private(sch); struct eadm_private *private = get_eadm_private(sch);
@@ -297,8 +297,6 @@ static int eadm_subchannel_remove(struct subchannel *sch)
spin_unlock_irq(sch->lock); spin_unlock_irq(sch->lock);
kfree(private); kfree(private);
return 0;
} }
static void eadm_subchannel_shutdown(struct subchannel *sch) static void eadm_subchannel_shutdown(struct subchannel *sch)

View File

@@ -28,12 +28,13 @@ static int scmdev_probe(struct device *dev)
return scmdrv->probe ? scmdrv->probe(scmdev) : -ENODEV; return scmdrv->probe ? scmdrv->probe(scmdev) : -ENODEV;
} }
static int scmdev_remove(struct device *dev) static void scmdev_remove(struct device *dev)
{ {
struct scm_device *scmdev = to_scm_dev(dev); struct scm_device *scmdev = to_scm_dev(dev);
struct scm_driver *scmdrv = to_scm_drv(dev->driver); struct scm_driver *scmdrv = to_scm_drv(dev->driver);
return scmdrv->remove ? scmdrv->remove(scmdev) : -ENODEV; if (scmdrv->remove)
scmdrv->remove(scmdev);
} }
static int scmdev_uevent(struct device *dev, struct kobj_uevent_env *env) static int scmdev_uevent(struct device *dev, struct kobj_uevent_env *env)

View File

@@ -234,7 +234,7 @@ out_free:
return ret; return ret;
} }
static int vfio_ccw_sch_remove(struct subchannel *sch) static void vfio_ccw_sch_remove(struct subchannel *sch)
{ {
struct vfio_ccw_private *private = dev_get_drvdata(&sch->dev); struct vfio_ccw_private *private = dev_get_drvdata(&sch->dev);
struct vfio_ccw_crw *crw, *temp; struct vfio_ccw_crw *crw, *temp;
@@ -257,7 +257,6 @@ static int vfio_ccw_sch_remove(struct subchannel *sch)
VFIO_CCW_MSG_EVENT(4, "unbound from subchannel %x.%x.%04x\n", VFIO_CCW_MSG_EVENT(4, "unbound from subchannel %x.%x.%04x\n",
sch->schid.cssid, sch->schid.ssid, sch->schid.cssid, sch->schid.ssid,
sch->schid.sch_no); sch->schid.sch_no);
return 0;
} }
static void vfio_ccw_sch_shutdown(struct subchannel *sch) static void vfio_ccw_sch_shutdown(struct subchannel *sch)

View File

@@ -890,7 +890,7 @@ out:
return rc; return rc;
} }
static int ap_device_remove(struct device *dev) static void ap_device_remove(struct device *dev)
{ {
struct ap_device *ap_dev = to_ap_dev(dev); struct ap_device *ap_dev = to_ap_dev(dev);
struct ap_driver *ap_drv = to_ap_drv(dev->driver); struct ap_driver *ap_drv = to_ap_drv(dev->driver);
@@ -914,8 +914,6 @@ static int ap_device_remove(struct device *dev)
spin_unlock_bh(&ap_queues_lock); spin_unlock_bh(&ap_queues_lock);
put_device(dev); put_device(dev);
return 0;
} }
struct ap_queue *ap_get_qdev(ap_qid_t qid) struct ap_queue *ap_get_qdev(ap_qid_t qid)

View File

@@ -7674,7 +7674,7 @@ static int sdebug_driver_probe(struct device *dev)
return error; return error;
} }
static int sdebug_driver_remove(struct device *dev) static void sdebug_driver_remove(struct device *dev)
{ {
struct sdebug_host_info *sdbg_host; struct sdebug_host_info *sdbg_host;
struct sdebug_dev_info *sdbg_devinfo, *tmp; struct sdebug_dev_info *sdbg_devinfo, *tmp;
@@ -7691,7 +7691,6 @@ static int sdebug_driver_remove(struct device *dev)
} }
scsi_host_put(sdbg_host->shost); scsi_host_put(sdbg_host->shost);
return 0;
} }
static int pseudo_lld_bus_match(struct device *dev, static int pseudo_lld_bus_match(struct device *dev,

View File

@@ -150,17 +150,13 @@ static int superhyway_device_probe(struct device *dev)
return -ENODEV; return -ENODEV;
} }
static int superhyway_device_remove(struct device *dev) static void superhyway_device_remove(struct device *dev)
{ {
struct superhyway_device *shyway_dev = to_superhyway_device(dev); struct superhyway_device *shyway_dev = to_superhyway_device(dev);
struct superhyway_driver *shyway_drv = to_superhyway_driver(dev->driver); struct superhyway_driver *shyway_drv = to_superhyway_driver(dev->driver);
if (shyway_drv && shyway_drv->remove) { if (shyway_drv->remove)
shyway_drv->remove(shyway_dev); shyway_drv->remove(shyway_dev);
return 0;
}
return -ENODEV;
} }
/** /**

View File

@@ -520,7 +520,7 @@ static int siox_probe(struct device *dev)
return sdriver->probe(sdevice); return sdriver->probe(sdevice);
} }
static int siox_remove(struct device *dev) static void siox_remove(struct device *dev)
{ {
struct siox_driver *sdriver = struct siox_driver *sdriver =
container_of(dev->driver, struct siox_driver, driver); container_of(dev->driver, struct siox_driver, driver);
@@ -528,8 +528,6 @@ static int siox_remove(struct device *dev)
if (sdriver->remove) if (sdriver->remove)
sdriver->remove(sdevice); sdriver->remove(sdevice);
return 0;
} }
static void siox_shutdown(struct device *dev) static void siox_shutdown(struct device *dev)

View File

@@ -81,7 +81,7 @@ static int slim_device_probe(struct device *dev)
return ret; return ret;
} }
static int slim_device_remove(struct device *dev) static void slim_device_remove(struct device *dev)
{ {
struct slim_device *sbdev = to_slim_device(dev); struct slim_device *sbdev = to_slim_device(dev);
struct slim_driver *sbdrv; struct slim_driver *sbdrv;
@@ -91,8 +91,6 @@ static int slim_device_remove(struct device *dev)
if (sbdrv->remove) if (sbdrv->remove)
sbdrv->remove(sbdev); sbdrv->remove(sbdev);
} }
return 0;
} }
static int slim_device_uevent(struct device *dev, struct kobj_uevent_env *env) static int slim_device_uevent(struct device *dev, struct kobj_uevent_env *env)

View File

@@ -217,7 +217,7 @@ static int apr_device_probe(struct device *dev)
return adrv->probe(adev); return adrv->probe(adev);
} }
static int apr_device_remove(struct device *dev) static void apr_device_remove(struct device *dev)
{ {
struct apr_device *adev = to_apr_device(dev); struct apr_device *adev = to_apr_device(dev);
struct apr_driver *adrv; struct apr_driver *adrv;
@@ -231,8 +231,6 @@ static int apr_device_remove(struct device *dev)
idr_remove(&apr->svcs_idr, adev->svc_id); idr_remove(&apr->svcs_idr, adev->svc_id);
spin_unlock(&apr->svcs_lock); spin_unlock(&apr->svcs_lock);
} }
return 0;
} }
static int apr_uevent(struct device *dev, struct kobj_uevent_env *env) static int apr_uevent(struct device *dev, struct kobj_uevent_env *env)

View File

@@ -409,7 +409,7 @@ static int spi_probe(struct device *dev)
return ret; return ret;
} }
static int spi_remove(struct device *dev) static void spi_remove(struct device *dev)
{ {
const struct spi_driver *sdrv = to_spi_driver(dev->driver); const struct spi_driver *sdrv = to_spi_driver(dev->driver);
@@ -424,8 +424,6 @@ static int spi_remove(struct device *dev)
} }
dev_pm_domain_detach(dev, true); dev_pm_domain_detach(dev, true);
return 0;
} }
static void spi_shutdown(struct device *dev) static void spi_shutdown(struct device *dev)

View File

@@ -345,7 +345,7 @@ fail_probe:
return err; return err;
} }
static int spmi_drv_remove(struct device *dev) static void spmi_drv_remove(struct device *dev)
{ {
const struct spmi_driver *sdrv = to_spmi_driver(dev->driver); const struct spmi_driver *sdrv = to_spmi_driver(dev->driver);
@@ -356,7 +356,6 @@ static int spmi_drv_remove(struct device *dev)
pm_runtime_disable(dev); pm_runtime_disable(dev);
pm_runtime_set_suspended(dev); pm_runtime_set_suspended(dev);
pm_runtime_put_noidle(dev); pm_runtime_put_noidle(dev);
return 0;
} }
static void spmi_drv_shutdown(struct device *dev) static void spmi_drv_shutdown(struct device *dev)

View File

@@ -283,7 +283,7 @@ static void ssb_device_shutdown(struct device *dev)
ssb_drv->shutdown(ssb_dev); ssb_drv->shutdown(ssb_dev);
} }
static int ssb_device_remove(struct device *dev) static void ssb_device_remove(struct device *dev)
{ {
struct ssb_device *ssb_dev = dev_to_ssb_dev(dev); struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
struct ssb_driver *ssb_drv = drv_to_ssb_drv(dev->driver); struct ssb_driver *ssb_drv = drv_to_ssb_drv(dev->driver);
@@ -291,8 +291,6 @@ static int ssb_device_remove(struct device *dev)
if (ssb_drv && ssb_drv->remove) if (ssb_drv && ssb_drv->remove)
ssb_drv->remove(ssb_dev); ssb_drv->remove(ssb_dev);
ssb_device_put(ssb_dev); ssb_device_put(ssb_dev);
return 0;
} }
static int ssb_device_probe(struct device *dev) static int ssb_device_probe(struct device *dev)

View File

@@ -1186,15 +1186,13 @@ static int anybus_bus_probe(struct device *dev)
return adrv->probe(adev); return adrv->probe(adev);
} }
static int anybus_bus_remove(struct device *dev) static void anybus_bus_remove(struct device *dev)
{ {
struct anybuss_client_driver *adrv = struct anybuss_client_driver *adrv =
to_anybuss_client_driver(dev->driver); to_anybuss_client_driver(dev->driver);
if (adrv->remove) if (adrv->remove)
adrv->remove(to_anybuss_client(dev)); adrv->remove(to_anybuss_client(dev));
return 0;
} }
static struct bus_type anybus_bus = { static struct bus_type anybus_bus = {

View File

@@ -169,7 +169,7 @@ static int gbphy_dev_probe(struct device *dev)
return ret; return ret;
} }
static int gbphy_dev_remove(struct device *dev) static void gbphy_dev_remove(struct device *dev)
{ {
struct gbphy_driver *gbphy_drv = to_gbphy_driver(dev->driver); struct gbphy_driver *gbphy_drv = to_gbphy_driver(dev->driver);
struct gbphy_device *gbphy_dev = to_gbphy_dev(dev); struct gbphy_device *gbphy_dev = to_gbphy_dev(dev);
@@ -180,8 +180,6 @@ static int gbphy_dev_remove(struct device *dev)
pm_runtime_set_suspended(dev); pm_runtime_set_suspended(dev);
pm_runtime_put_noidle(dev); pm_runtime_put_noidle(dev);
pm_runtime_dont_use_autosuspend(dev); pm_runtime_dont_use_autosuspend(dev);
return 0;
} }
static struct bus_type gbphy_bus_type = { static struct bus_type gbphy_bus_type = {

View File

@@ -81,7 +81,7 @@ static int tcm_loop_show_info(struct seq_file *m, struct Scsi_Host *host)
} }
static int tcm_loop_driver_probe(struct device *); static int tcm_loop_driver_probe(struct device *);
static int tcm_loop_driver_remove(struct device *); static void tcm_loop_driver_remove(struct device *);
static int pseudo_lld_bus_match(struct device *dev, static int pseudo_lld_bus_match(struct device *dev,
struct device_driver *dev_driver) struct device_driver *dev_driver)
@@ -363,7 +363,7 @@ static int tcm_loop_driver_probe(struct device *dev)
return 0; return 0;
} }
static int tcm_loop_driver_remove(struct device *dev) static void tcm_loop_driver_remove(struct device *dev)
{ {
struct tcm_loop_hba *tl_hba; struct tcm_loop_hba *tl_hba;
struct Scsi_Host *sh; struct Scsi_Host *sh;
@@ -373,7 +373,6 @@ static int tcm_loop_driver_remove(struct device *dev)
scsi_remove_host(sh); scsi_remove_host(sh);
scsi_host_put(sh); scsi_host_put(sh);
return 0;
} }
static void tcm_loop_release_adapter(struct device *dev) static void tcm_loop_release_adapter(struct device *dev)

View File

@@ -86,7 +86,7 @@ static int tb_service_probe(struct device *dev)
return driver->probe(svc, id); return driver->probe(svc, id);
} }
static int tb_service_remove(struct device *dev) static void tb_service_remove(struct device *dev)
{ {
struct tb_service *svc = tb_to_service(dev); struct tb_service *svc = tb_to_service(dev);
struct tb_service_driver *driver; struct tb_service_driver *driver;
@@ -94,8 +94,6 @@ static int tb_service_remove(struct device *dev)
driver = container_of(dev->driver, struct tb_service_driver, driver); driver = container_of(dev->driver, struct tb_service_driver, driver);
if (driver->remove) if (driver->remove)
driver->remove(svc); driver->remove(svc);
return 0;
} }
static void tb_service_shutdown(struct device *dev) static void tb_service_shutdown(struct device *dev)

View File

@@ -421,15 +421,13 @@ static int serdev_drv_probe(struct device *dev)
return ret; return ret;
} }
static int serdev_drv_remove(struct device *dev) static void serdev_drv_remove(struct device *dev)
{ {
const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver); const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver);
if (sdrv->remove) if (sdrv->remove)
sdrv->remove(to_serdev_device(dev)); sdrv->remove(to_serdev_device(dev));
dev_pm_domain_detach(dev, true); dev_pm_domain_detach(dev, true);
return 0;
} }
static struct bus_type serdev_bus_type = { static struct bus_type serdev_bus_type = {

View File

@@ -78,14 +78,12 @@ static int ulpi_probe(struct device *dev)
return drv->probe(to_ulpi_dev(dev)); return drv->probe(to_ulpi_dev(dev));
} }
static int ulpi_remove(struct device *dev) static void ulpi_remove(struct device *dev)
{ {
struct ulpi_driver *drv = to_ulpi_driver(dev->driver); struct ulpi_driver *drv = to_ulpi_driver(dev->driver);
if (drv->remove) if (drv->remove)
drv->remove(to_ulpi_dev(dev)); drv->remove(to_ulpi_dev(dev));
return 0;
} }
static struct bus_type ulpi_bus = { static struct bus_type ulpi_bus = {

View File

@@ -74,7 +74,7 @@ err_autopm_put:
return retval; return retval;
} }
static int usb_serial_device_remove(struct device *dev) static void usb_serial_device_remove(struct device *dev)
{ {
struct usb_serial_port *port = to_usb_serial_port(dev); struct usb_serial_port *port = to_usb_serial_port(dev);
struct usb_serial_driver *driver; struct usb_serial_driver *driver;
@@ -101,8 +101,6 @@ static int usb_serial_device_remove(struct device *dev)
if (!autopm_err) if (!autopm_err)
usb_autopm_put_interface(port->serial->interface); usb_autopm_put_interface(port->serial->interface);
return 0;
} }
static ssize_t new_id_store(struct device_driver *driver, static ssize_t new_id_store(struct device_driver *driver,

View File

@@ -382,7 +382,7 @@ static int typec_probe(struct device *dev)
return ret; return ret;
} }
static int typec_remove(struct device *dev) static void typec_remove(struct device *dev)
{ {
struct typec_altmode_driver *drv = to_altmode_driver(dev->driver); struct typec_altmode_driver *drv = to_altmode_driver(dev->driver);
struct typec_altmode *adev = to_typec_altmode(dev); struct typec_altmode *adev = to_typec_altmode(dev);
@@ -400,8 +400,6 @@ static int typec_remove(struct device *dev)
adev->desc = NULL; adev->desc = NULL;
adev->ops = NULL; adev->ops = NULL;
return 0;
} }
struct bus_type typec_bus = { struct bus_type typec_bus = {

View File

@@ -34,15 +34,13 @@ static int vdpa_dev_probe(struct device *d)
return ret; return ret;
} }
static int vdpa_dev_remove(struct device *d) static void vdpa_dev_remove(struct device *d)
{ {
struct vdpa_device *vdev = dev_to_vdpa(d); struct vdpa_device *vdev = dev_to_vdpa(d);
struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver); struct vdpa_driver *drv = drv_to_vdpa(vdev->dev.driver);
if (drv && drv->remove) if (drv && drv->remove)
drv->remove(vdev); drv->remove(vdev);
return 0;
} }
static struct bus_type vdpa_bus = { static struct bus_type vdpa_bus = {

View File

@@ -57,7 +57,7 @@ static int mdev_probe(struct device *dev)
return ret; return ret;
} }
static int mdev_remove(struct device *dev) static void mdev_remove(struct device *dev)
{ {
struct mdev_driver *drv = struct mdev_driver *drv =
container_of(dev->driver, struct mdev_driver, driver); container_of(dev->driver, struct mdev_driver, driver);
@@ -67,8 +67,6 @@ static int mdev_remove(struct device *dev)
drv->remove(mdev); drv->remove(mdev);
mdev_detach_iommu(mdev); mdev_detach_iommu(mdev);
return 0;
} }
static int mdev_match(struct device *dev, struct device_driver *drv) static int mdev_match(struct device *dev, struct device_driver *drv)

View File

@@ -278,7 +278,7 @@ err:
} }
static int virtio_dev_remove(struct device *_d) static void virtio_dev_remove(struct device *_d)
{ {
struct virtio_device *dev = dev_to_virtio(_d); struct virtio_device *dev = dev_to_virtio(_d);
struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
@@ -292,7 +292,6 @@ static int virtio_dev_remove(struct device *_d)
/* Acknowledge the device's existence again. */ /* Acknowledge the device's existence again. */
virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
return 0;
} }
static struct bus_type virtio_bus = { static struct bus_type virtio_bus = {

View File

@@ -342,14 +342,12 @@ static int vlynq_device_probe(struct device *dev)
return result; return result;
} }
static int vlynq_device_remove(struct device *dev) static void vlynq_device_remove(struct device *dev)
{ {
struct vlynq_driver *drv = to_vlynq_driver(dev->driver); struct vlynq_driver *drv = to_vlynq_driver(dev->driver);
if (drv->remove) if (drv->remove)
drv->remove(to_vlynq_device(dev)); drv->remove(to_vlynq_device(dev));
return 0;
} }
int __vlynq_register_driver(struct vlynq_driver *driver, struct module *owner) int __vlynq_register_driver(struct vlynq_driver *driver, struct module *owner)

View File

@@ -1990,7 +1990,7 @@ static int vme_bus_probe(struct device *dev)
return -ENODEV; return -ENODEV;
} }
static int vme_bus_remove(struct device *dev) static void vme_bus_remove(struct device *dev)
{ {
struct vme_driver *driver; struct vme_driver *driver;
struct vme_dev *vdev = dev_to_vme_dev(dev); struct vme_dev *vdev = dev_to_vme_dev(dev);
@@ -1998,8 +1998,6 @@ static int vme_bus_remove(struct device *dev)
driver = dev->platform_data; driver = dev->platform_data;
if (driver->remove) if (driver->remove)
driver->remove(vdev); driver->remove(vdev);
return 0;
} }
struct bus_type vme_bus_type = { struct bus_type vme_bus_type = {

Some files were not shown because too many files have changed in this diff Show More