Re: [PATCH] platform/x86: wmi: Drop forward declaration of static functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 9/19/22 13:22, Uwe Kleine-König wrote:
> Usually it's not necessary to declare static functions if the symbols are
> in the right order. Moving the definition of acpi_wmi_driver down in the
> compilation unit allows to drop two such declarations.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
>  drivers/platform/x86/wmi.c | 21 +++++++++------------
>  1 file changed, 9 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index aed293b5af81..dbc535b772b3 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -95,9 +95,6 @@ module_param(debug_dump_wdg, bool, 0444);
>  MODULE_PARM_DESC(debug_dump_wdg,
>  		 "Dump available WMI interfaces [0/1]");
>  
> -static int acpi_wmi_remove(struct platform_device *device);
> -static int acpi_wmi_probe(struct platform_device *device);
> -
>  static const struct acpi_device_id wmi_device_ids[] = {
>  	{"PNP0C14", 0},
>  	{"pnp0c14", 0},
> @@ -105,15 +102,6 @@ static const struct acpi_device_id wmi_device_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(acpi, wmi_device_ids);
>  
> -static struct platform_driver acpi_wmi_driver = {
> -	.driver = {
> -		.name = "acpi-wmi",
> -		.acpi_match_table = wmi_device_ids,
> -	},
> -	.probe = acpi_wmi_probe,
> -	.remove = acpi_wmi_remove,
> -};
> -
>  /*
>   * GUID parsing functions
>   */
> @@ -1449,6 +1437,15 @@ void wmi_driver_unregister(struct wmi_driver *driver)
>  }
>  EXPORT_SYMBOL(wmi_driver_unregister);
>  
> +static struct platform_driver acpi_wmi_driver = {
> +	.driver = {
> +		.name = "acpi-wmi",
> +		.acpi_match_table = wmi_device_ids,
> +	},
> +	.probe = acpi_wmi_probe,
> +	.remove = acpi_wmi_remove,
> +};
> +
>  static int __init acpi_wmi_init(void)
>  {
>  	int error;
> 
> base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux