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

Configure Feed

Select the types of activity you want to include in your feed.

driver core: make bus_find_device_by_acpi_dev() stub prototype aligned

Currently the bus_find_device_by_acpi_dev() stub for !CONFIG_ACPI case
takes a const void * parameter instead of const struct acpi_device *.
As long as it's a pointer, we may named it as we want to with the help
of a forward declaration. Hence move the declaration out of the
ifdeffery and use the same prototype in both cases. This adds a bit of
an additional type checking at a compilation time.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251229144325.1252197-1-andriy.shevchenko@linux.intel.com
[ Fix minor typo in the commit message. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Andy Shevchenko and committed by
Danilo Krummrich
e254b758 d88f27d7

+2 -2
+2 -2
include/linux/device/bus.h
··· 215 215 return bus_find_device(bus, cur, NULL, device_match_any); 216 216 } 217 217 218 - #ifdef CONFIG_ACPI 219 218 struct acpi_device; 220 219 220 + #ifdef CONFIG_ACPI 221 221 /** 222 222 * bus_find_device_by_acpi_dev : device iterator for locating a particular device 223 223 * matching the ACPI COMPANION device. ··· 231 231 } 232 232 #else 233 233 static inline struct device * 234 - bus_find_device_by_acpi_dev(const struct bus_type *bus, const void *adev) 234 + bus_find_device_by_acpi_dev(const struct bus_type *bus, const struct acpi_device *adev) 235 235 { 236 236 return NULL; 237 237 }