[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6d69fb63-a84f-31e5-0a88-4a154e290573@roeck-us.net>
Date: Wed, 27 Apr 2022 05:04:14 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Eugene Shalygin <eugene.shalygin@...il.com>
Cc: Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/4] hwmon: (asus-ec-sensors) introduce ec_board_info
struct for board data
On 4/27/22 02:32, Eugene Shalygin wrote:
>> Since this is now tied to MODULE_DEVICE_TABLE(acpi, ...), I think the
>> probe function should be referenced in asus_ec_sensors_platform_driver,
>> and it should be module_platform_driver() instead of
>> module_platform_driver_probe().
>
> As follows?
>
> static struct platform_driver asus_ec_sensors_platform_driver_probe = {
> .probe = asus_ec_probe,
> .driver = {
> .name = "asus-ec-sensors",
> .acpi_match_table = acpi_ec_ids,
> },
> };
>
> MODULE_DEVICE_TABLE(acpi, acpi_ec_ids);
> module_platform_driver(asus_ec_sensors_platform_driver_probe);
>
> The "_probe" suffix added to keep the asus_ec_probe() code and its
> deps as __init.
>
Sorry, I don't follow that part. One can add "__init" or "__initdata",
as in
static struct platform_driver asus_ec_sensors_platform_driver __initdata = {
to mark a function or data structure as __init. I don't think adding
"_probe" to the struct platform_driver variable name does that.
Guenter
Powered by blists - more mailing lists