summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-07-09 22:37:28 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-02 16:44:22 +0200
commitbb664e50a9e0471fcaf0b2d84ee46a764cd2258d (patch)
tree2893f0dfe937ff18b8505e7475e9ed451cb1b58b /drivers
parentACPI: sysfs: manage sysfs attributes through device core (diff)
downloadlinux-bb664e50a9e0471fcaf0b2d84ee46a764cd2258d.tar.xz
linux-bb664e50a9e0471fcaf0b2d84ee46a764cd2258d.zip
ACPI: sysfs: remove return value of acpi_device_setup_files()
The function can not fail anymore, so drop its return value. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-5-058ab0667fa8@weissschuh.net Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/device_sysfs.c6
-rw-r--r--drivers/acpi/internal.h2
-rw-r--r--drivers/acpi/scan.c5
3 files changed, 3 insertions, 10 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index 0bff4a1654ed..3961fc47152c 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -605,13 +605,9 @@ const struct attribute_group *acpi_groups[] = {
* acpi_device_setup_files - Create sysfs attributes of an ACPI device.
* @dev: ACPI device object.
*/
-int acpi_device_setup_files(struct acpi_device *dev)
+void acpi_device_setup_files(struct acpi_device *dev)
{
- int result = 0;
-
acpi_expose_nondev_subnodes(&dev->dev.kobj, &dev->data);
-
- return result;
}
/**
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index 8e1c21e45d0e..ca712a7fde21 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -118,7 +118,7 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
int type, void (*release)(struct device *));
int acpi_tie_acpi_dev(struct acpi_device *adev);
int acpi_device_add(struct acpi_device *device);
-int acpi_device_setup_files(struct acpi_device *dev);
+void acpi_device_setup_files(struct acpi_device *dev);
void acpi_device_remove_files(struct acpi_device *dev);
extern const struct attribute_group *acpi_groups[];
void acpi_device_add_finalize(struct acpi_device *device);
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 14dba8f6faff..494f4f503e5b 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -795,10 +795,7 @@ int acpi_device_add(struct acpi_device *device)
goto err;
}
- result = acpi_device_setup_files(device);
- if (result)
- pr_err("Error creating sysfs interface for device %s\n",
- dev_name(&device->dev));
+ acpi_device_setup_files(device);
return 0;