Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688640
| From | "Gustavo A. R. Silva" <garsilva@embeddedor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] gpio: altera-a10sr: constify gpio_chip structure |
| Date | 2017-07-17 06:20 +0200 |
| Message-ID | <u45FL-6o-9@gated-at.bofh.it> (permalink) |
| References | <u2bFE-86f-19@gated-at.bofh.it> <u2QfM-85-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/13/2017 12:41 PM, Thor Thayer wrote:
> On 07/11/2017 05:15 PM, Gustavo A. R. Silva wrote:
>> This structure is only used to copy into another structure, so declare
>> it as const.
>
> <snip>
>
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>> ---
>> drivers/gpio/gpio-altera-a10sr.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpio/gpio-altera-a10sr.c
>> b/drivers/gpio/gpio-altera-a10sr.c
>> index 16a8951..6b11f13 100644
>> --- a/drivers/gpio/gpio-altera-a10sr.c
>> +++ b/drivers/gpio/gpio-altera-a10sr.c
>> @@ -71,7 +71,7 @@ static int altr_a10sr_gpio_direction_output(struct
>> gpio_chip *gc,
>> return -EINVAL;
>> }
>> -static struct gpio_chip altr_a10sr_gc = {
>> +static const struct gpio_chip altr_a10sr_gc = {
>> .label = "altr_a10sr_gpio",
>> .owner = THIS_MODULE,
>> .get = altr_a10sr_gpio_get,
>>
> Reviewed-by: Thor Thayer <thor.thayer@linux.intel.com>
Thank you, Thor.
--
Gustavo A. R. Silva
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] gpio: altera-a10sr: constify gpio_chip structure "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-07-12 00:20 +0200
Re: [PATCH] gpio: altera-a10sr: constify gpio_chip structure Thor Thayer <thor.thayer@linux.intel.com> - 2017-07-13 19:40 +0200
Re: [PATCH] gpio: altera-a10sr: constify gpio_chip structure "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-07-17 06:20 +0200
csiph-web