From: jerome Neanne <jneanne@baylibre.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Tony Lindgren <tony@atomide.com>, Lee Jones <lee@kernel.org>,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-omap@vger.kernel.org,
Jonathan Cormier <jcormier@criticallink.com>
Subject: Re: [PATCH v2 1/2] gpio: tps65219: add GPIO support for TPS65219 PMIC
Date: Tue, 16 May 2023 15:49:16 +0200 [thread overview]
Message-ID: <9a52e227-4f36-3766-7a1e-b2cc37a3657a@baylibre.com> (raw)
In-Reply-To: <CAMRc=Md-CzrG3QPtnh0OxYaHTAYZ2aUfMKhkAOeRm2Zn30qE0A@mail.gmail.com>
On 15/05/2023 17:36, Bartosz Golaszewski wrote:
>> +static const struct gpio_chip tps65219_gpio_chip = {
>> + .label = "tps65219-gpio",
>> + .owner = THIS_MODULE,
>> + .get_direction = tps65219_gpio_get_direction,
>> + .direction_input = tps65219_gpio_direction_input,
>> + .direction_output = tps65219_gpio_direction_output,
>> + .get = tps65219_gpio_get,
>> + .set = tps65219_gpio_set,
>> + .base = -1,
>> + .ngpio = 3,
>> + .can_sleep = true,
>> +};
>> +
>> +static int tps65219_gpio_probe(struct platform_device *pdev)
>> +{
>> + struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent);
>> + struct tps65219_gpio *gpio;
>> +
>> + gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
>> + if (!gpio)
>> + return -ENOMEM;
>> +
>> + gpio->tps = tps;
>> + gpio->gpio_chip = tps65219_gpio_chip;
>
> Aren't you getting any warnings here about dropping the 'const' from
> the global structure?
I tried a build with W=1 to check for warning I might have missed but
can't catch any here.
It's done in the exact same way in many other upstream drivers.
Anyway I can remove the const here if you think that could create
trouble at some point.
Just let me know your recommendation.
Regards,
Jerome
next prev parent reply other threads:[~2023-05-16 13:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 14:09 [PATCH v2 0/2] Add support for TI TPS65219 PMIC GPIO interface Jerome Neanne
2023-05-11 14:09 ` [PATCH v2 1/2] gpio: tps65219: add GPIO support for TPS65219 PMIC Jerome Neanne
2023-05-11 20:57 ` Linus Walleij
2023-05-12 7:13 ` jerome Neanne
2023-05-17 6:33 ` Tony Lindgren
2023-05-22 12:26 ` jerome Neanne
2023-05-15 15:36 ` Bartosz Golaszewski
2023-05-16 13:49 ` jerome Neanne [this message]
2023-05-20 9:44 ` andy.shevchenko
2023-05-22 7:47 ` jerome Neanne
2023-05-22 11:18 ` Andy Shevchenko
2023-05-23 9:09 ` jerome Neanne
2023-05-26 13:31 ` Bartosz Golaszewski
2023-05-11 14:09 ` [PATCH v2 2/2] mfd: tps65219: Add gpio cell instance Jerome Neanne
2023-05-11 20:59 ` Linus Walleij
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=9a52e227-4f36-3766-7a1e-b2cc37a3657a@baylibre.com \
--to=jneanne@baylibre.com \
--cc=brgl@bgdev.pl \
--cc=jcormier@criticallink.com \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.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®