Skip to contentSkip to conversation

acpi/bus: Remove notify callback and flags

PATCH Superseded Michal Wilczynski 2 participants 3 messages Jun 1, 2023 – Jun 2, 2023

Subsystems (7)

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 35/35 acpi/bus: Remove notify callback and flags

As callback has been replaced by drivers installing their handlers in .add it's presence is not useful anymore.

Remove .notify callback and flags variable from struct acpi_driver, as they're not needed anymore.

---
 include/acpi/acpi_bus.h | 3 ---
 1 file changed, 3 deletions(-)
include/acpi/acpi_bus.h +0 -3
index 7fb411438b6f..3326794d5b70 100644
@@ -151,12 +151,10 @@ struct acpi_hotplug_context {
 
 typedef int (*acpi_op_add) (struct acpi_device * device);
 typedef void (*acpi_op_remove) (struct acpi_device *device);
-typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event);
 
 struct acpi_device_ops {
 	acpi_op_add add;
 	acpi_op_remove remove;
-	acpi_op_notify notify;
 };
 
 #define ACPI_DRIVER_ALL_NOTIFY_EVENTS	0x1	/* system AND device events */
@@ -165,7 +163,6 @@ struct acpi_driver {
 	char name[80];
 	char class[80];
 	const struct acpi_device_id *ids; /* Supported Hardware IDs */
-	unsigned int flags;
 	struct acpi_device_ops ops;
 	struct device_driver drv;
 	struct module *owner;
Signature · 1 line
2.40.1
#1 lore raw

Hi Michal,

Quoted 31 lines · Michal Wilczynski

As callback has been replaced by drivers installing their handlers in .add it's presence is not useful anymore.

Remove .notify callback and flags variable from struct acpi_driver, as they're not needed anymore.

---
 include/acpi/acpi_bus.h | 3 ---

 1 file changed, 3 deletions(-)
include/acpi/acpi_bus.h +0 -0
index 7fb411438b6f..3326794d5b70 100644
@@ -151,12 +151,10 @@ struct acpi_hotplug_context {


 typedef int (*acpi_op_add) (struct acpi_device * device); typedef void (*acpi_op_remove) (struct acpi_device *device); -typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event);
 struct acpi_device_ops {
        acpi_op_add add;
        acpi_op_remove remove;
-       acpi_op_notify notify;
 };

 #define ACPI_DRIVER_ALL_NOTIFY_EVENTS  0x1     /* system AND device events */

include/acpi/acpi_bus.h +0 -0
@@ -165,7 +163,6 @@ struct acpi_driver {
         char name[80];
         char class[80];
Quoted 2 lines

        const struct acpi_device_id *ids; /* Supported Hardware IDs */ -       unsigned int flags;

Can ACPI_DRIVER_ALL_NOTIFY_EVENTS be removed as well?

Quoted 3 lines

        struct acpi_device_ops ops;
        struct device_driver drv;
        struct module *owner;

#2 lore raw
Quoted 29 lines · David E. Box

Hi Michal,

Quoted 26 lines · Michal Wilczynski

As callback has been replaced by drivers installing their handlers in .add it's presence is not useful anymore.

Remove .notify callback and flags variable from struct acpi_driver, as they're not needed anymore.

---
 include/acpi/acpi_bus.h | 3 ---

 1 file changed, 3 deletions(-)
include/acpi/acpi_bus.h +0 -0
index 7fb411438b6f..3326794d5b70 100644
@@ -151,12 +151,10 @@ struct acpi_hotplug_context {


 typedef int (*acpi_op_add) (struct acpi_device * device); typedef void (*acpi_op_remove) (struct acpi_device *device); -typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event);
 struct acpi_device_ops {
        acpi_op_add add;
        acpi_op_remove remove;
-       acpi_op_notify notify;
 };

Quoted 8 lines
Quoted 7 lines


 #define ACPI_DRIVER_ALL_NOTIFY_EVENTS  0x1     /* system AND device events */

include/acpi/acpi_bus.h +0 -0
@@ -165,7 +163,6 @@ struct acpi_driver {
         char name[80];
         char class[80];

        const struct acpi_device_id *ids; /* Supported Hardware IDs */ -       unsigned int flags;

Can ACPI_DRIVER_ALL_NOTIFY_EVENTS be removed as well?

Hi David,
Oh yeah, it should be removed as well,

Thanks !

Quoted 4 lines
Quoted 4 lines

        struct acpi_device_ops ops;
        struct device_driver drv;
        struct module *owner;