Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

driver core: Remove unused platform_notify, platform_notify_remove

The "platform_notify" and "platform_notify_remove" hooks have been unused
since 00ba9357d189 ("ARM: ixp4xx: Drop custom DMA coherency and bouncing").

Remove "platform_notify" and "platform_notify_remove". No functional
change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20240325221409.1457036-1-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Bjorn Helgaas and committed by
Greg Kroah-Hartman
0bb322be 4cece764

-19
-8
drivers/base/core.c
··· 2331 2331 2332 2332 /* Device links support end. */ 2333 2333 2334 - int (*platform_notify)(struct device *dev) = NULL; 2335 - int (*platform_notify_remove)(struct device *dev) = NULL; 2336 2334 static struct kobject *dev_kobj; 2337 2335 2338 2336 /* /sys/dev/char */ ··· 2378 2380 acpi_device_notify(dev); 2379 2381 2380 2382 software_node_notify(dev); 2381 - 2382 - if (platform_notify) 2383 - platform_notify(dev); 2384 2383 } 2385 2384 2386 2385 static void device_platform_notify_remove(struct device *dev) 2387 2386 { 2388 - if (platform_notify_remove) 2389 - platform_notify_remove(dev); 2390 - 2391 2387 software_node_notify_remove(dev); 2392 2388 2393 2389 acpi_device_notify_remove(dev);
-11
include/linux/device.h
··· 1207 1207 const struct attribute_group *grp); 1208 1208 1209 1209 /* 1210 - * Platform "fixup" functions - allow the platform to have their say 1211 - * about devices and actions that the general device layer doesn't 1212 - * know about. 1213 - */ 1214 - /* Notify platform of device discovery */ 1215 - extern int (*platform_notify)(struct device *dev); 1216 - 1217 - extern int (*platform_notify_remove)(struct device *dev); 1218 - 1219 - 1220 - /* 1221 1210 * get_device - atomically increment the reference count for the device. 1222 1211 * 1223 1212 */