From: Krzysztof Kozlowski <krzk@kernel.org>
To: Aaron Kling <webgeek1234@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: palmas: Allow building as a module
Date: Fri, 23 May 2025 08:26:50 +0200 [thread overview]
Message-ID: <0b09b4ba-341f-4c22-a9b9-5f49f15787c4@kernel.org> (raw)
In-Reply-To: <CALHNRZ9Hkz3_yJZmzJJR9jaJdYpxO2FddrXG_V1GZMLp=jGCuQ@mail.gmail.com>
On 23/05/2025 00:04, Aaron Kling wrote:
>>> +++ b/drivers/gpio/gpio-palmas.c
>>> @@ -191,9 +191,9 @@ static struct platform_driver palmas_gpio_driver = {
>>> .driver.of_match_table = of_palmas_gpio_match,
>>> .probe = palmas_gpio_probe,
>>> };
>>> +module_platform_driver(palmas_gpio_driver);
>>>
>>> -static int __init palmas_gpio_init(void)
>>> -{
>>> - return platform_driver_register(&palmas_gpio_driver);
>>> -}
>>> -subsys_initcall(palmas_gpio_init);
>>> +MODULE_ALIAS("platform:palmas_gpio");
>>
>>
>> Drop. You miss proper MODULE_DEVICE_TABLE instead. You should not need
>> MODULE_ALIAS() in normal cases. If you need it, usually it means your
>> device ID table is wrong (e.g. misses either entries or
>> MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute for
>> incomplete ID table.
>
> I just copied from the other drivers for this mfd, like clk-palmas,
> palmas-regulator, etc. I don't know if there's a reason these others
> have aliases or not, but they all have it. I'll update this patch per
> the suggestions and send a v2.
They might be coming from old board files, so the alias was needed, but
if board files were removed then this does not apply anymore. And I
checked - no user of the alias.
Best regards,
Krzysztof
prev parent reply other threads:[~2025-05-23 6:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 15:52 Aaron Kling via B4 Relay
2025-05-22 17:42 ` Krzysztof Kozlowski
2025-05-22 22:04 ` Aaron Kling
2025-05-23 6:26 ` Krzysztof Kozlowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0b09b4ba-341f-4c22-a9b9-5f49f15787c4@kernel.org \
--to=krzk@kernel.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=webgeek1234@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®