Skip to content

Commit 7d625e5

Browse files
committed
ACPI: glue: Change return type of two functions to void
Since the return values of acpi_device_notify() and acpi_device_notify_remove() are discarded by their only caller, change their return type to void. No functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
1 parent 42878a9 commit 7d625e5

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/acpi/glue.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ int acpi_unbind_one(struct device *dev)
285285
}
286286
EXPORT_SYMBOL_GPL(acpi_unbind_one);
287287

288-
static int acpi_device_notify(struct device *dev)
288+
static void acpi_device_notify(struct device *dev)
289289
{
290290
struct acpi_bus_type *type = acpi_get_bus_type(dev);
291291
struct acpi_device *adev;
@@ -299,7 +299,6 @@ static int acpi_device_notify(struct device *dev)
299299
adev = type->find_companion(dev);
300300
if (!adev) {
301301
dev_dbg(dev, "ACPI companion not found\n");
302-
ret = -ENODEV;
303302
goto err;
304303
}
305304
ret = acpi_bind_one(dev, adev);
@@ -319,21 +318,19 @@ static int acpi_device_notify(struct device *dev)
319318
acpi_handle_debug(ACPI_HANDLE(dev), "Bound to device %s\n",
320319
dev_name(dev));
321320

322-
return 0;
321+
return;
323322

324323
err:
325324
dev_dbg(dev, "No ACPI support\n");
326-
327-
return ret;
328325
}
329326

330-
static int acpi_device_notify_remove(struct device *dev)
327+
static void acpi_device_notify_remove(struct device *dev)
331328
{
332329
struct acpi_device *adev = ACPI_COMPANION(dev);
333330
struct acpi_bus_type *type;
334331

335332
if (!adev)
336-
return 0;
333+
return;
337334

338335
type = acpi_get_bus_type(dev);
339336
if (type && type->cleanup)
@@ -342,7 +339,6 @@ static int acpi_device_notify_remove(struct device *dev)
342339
adev->handler->unbind(dev);
343340

344341
acpi_unbind_one(dev);
345-
return 0;
346342
}
347343

348344
int acpi_platform_notify(struct device *dev, enum kobject_action action)

0 commit comments

Comments
 (0)