diff mbox series

[v4,35/35] acpi/bus: Remove notify callback and flags

Message ID 20230601132137.301802-1-michal.wilczynski@intel.com (mailing list archive)
State Handled Elsewhere
Headers show
Series Remove .notify callback in acpi_device_ops | expand

Commit Message

Wilczynski, Michal June 1, 2023, 1:21 p.m. UTC
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.

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
---
 include/acpi/acpi_bus.h | 3 ---
 1 file changed, 3 deletions(-)

Comments

David E. Box June 2, 2023, 1:08 a.m. UTC | #1
Hi Michal,

On Thu, 2023-06-01 at 15:21 +0200, Michal Wilczynski wrote:
> 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.
> 
> Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
> ---
>  include/acpi/acpi_bus.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index 7fb411438b6f..3326794d5b70 100644
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -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;

Can ACPI_DRIVER_ALL_NOTIFY_EVENTS be removed as well?

>         struct acpi_device_ops ops;
>         struct device_driver drv;
>         struct module *owner;
Wilczynski, Michal June 2, 2023, 9:26 a.m. UTC | #2
On 6/2/2023 3:08 AM, David E. Box wrote:
> Hi Michal,
>
> On Thu, 2023-06-01 at 15:21 +0200, Michal Wilczynski wrote:
>> 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.
>>
>> Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
>> ---
>>  include/acpi/acpi_bus.h | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
>> index 7fb411438b6f..3326794d5b70 100644
>> --- a/include/acpi/acpi_bus.h
>> +++ b/include/acpi/acpi_bus.h
>> @@ -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;
> Can ACPI_DRIVER_ALL_NOTIFY_EVENTS be removed as well?

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

Thanks !

>
>>         struct acpi_device_ops ops;
>>         struct device_driver drv;
>>         struct module *owner;
diff mbox series

Patch

diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 7fb411438b6f..3326794d5b70 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -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;