diff mbox

[2/2] gpio: davinci: use irq_data_get_chip_type

Message ID ca4c79f0383786097cf59da27432eb619325002b.1451484758.git.geliangtang@163.com
State New
Headers show

Commit Message

Geliang Tang Dec. 30, 2015, 2:16 p.m. UTC
Use irq_data_get_chip_type() instead of container_of().

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/gpio/gpio-davinci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Linus Walleij Jan. 27, 2016, 1:56 p.m. UTC | #1
On Wed, Dec 30, 2015 at 3:16 PM, Geliang Tang <geliangtang@163.com> wrote:

> Use irq_data_get_chip_type() instead of container_of().
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  drivers/gpio/gpio-davinci.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
> index 65ebaef..aaa1a249 100644
> --- a/drivers/gpio/gpio-davinci.c
> +++ b/drivers/gpio/gpio-davinci.c
> @@ -435,8 +435,7 @@ static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq)
>  {
>         static struct irq_chip_type gpio_unbanked;
>
> -       gpio_unbanked = *container_of(irq_get_chip(irq),
> -                                     struct irq_chip_type, chip);
> +       gpio_unbanked = *irq_data_get_chip_type(irq_get_irq_data(irq));
>
>         return &gpio_unbanked.chip;
>  };

Grygorii/Santosh, can you ACK/comment on this patch?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Grygorii Strashko Jan. 27, 2016, 4:35 p.m. UTC | #2
On 01/27/2016 03:56 PM, Linus Walleij wrote:
> On Wed, Dec 30, 2015 at 3:16 PM, Geliang Tang <geliangtang@163.com> wrote:
>
>> Use irq_data_get_chip_type() instead of container_of().
>>
>> Signed-off-by: Geliang Tang <geliangtang@163.com>
>> ---
>>   drivers/gpio/gpio-davinci.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
>> index 65ebaef..aaa1a249 100644
>> --- a/drivers/gpio/gpio-davinci.c
>> +++ b/drivers/gpio/gpio-davinci.c
>> @@ -435,8 +435,7 @@ static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq)
>>   {
>>          static struct irq_chip_type gpio_unbanked;
>>
>> -       gpio_unbanked = *container_of(irq_get_chip(irq),
>> -                                     struct irq_chip_type, chip);
>> +       gpio_unbanked = *irq_data_get_chip_type(irq_get_irq_data(irq));
>>
>>          return &gpio_unbanked.chip;
>>   };
>
> Grygorii/Santosh, can you ACK/comment on this patch?
>

Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Santosh Shilimkar Jan. 27, 2016, 7:03 p.m. UTC | #3
On 1/27/2016 8:35 AM, Grygorii Strashko wrote:
> On 01/27/2016 03:56 PM, Linus Walleij wrote:
>> On Wed, Dec 30, 2015 at 3:16 PM, Geliang Tang <geliangtang@163.com>
>> wrote:
>>
>>> Use irq_data_get_chip_type() instead of container_of().
>>>
>>> Signed-off-by: Geliang Tang <geliangtang@163.com>
>>> ---
>>>   drivers/gpio/gpio-davinci.c | 3 +--
>>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
>>> index 65ebaef..aaa1a249 100644
>>> --- a/drivers/gpio/gpio-davinci.c
>>> +++ b/drivers/gpio/gpio-davinci.c
>>> @@ -435,8 +435,7 @@ static struct irq_chip
>>> *davinci_gpio_get_irq_chip(unsigned int irq)
>>>   {
>>>          static struct irq_chip_type gpio_unbanked;
>>>
>>> -       gpio_unbanked = *container_of(irq_get_chip(irq),
>>> -                                     struct irq_chip_type, chip);
>>> +       gpio_unbanked = *irq_data_get_chip_type(irq_get_irq_data(irq));
>>>
>>>          return &gpio_unbanked.chip;
>>>   };
>>
>> Grygorii/Santosh, can you ACK/comment on this patch?
>>
>
> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Jan. 28, 2016, 2:29 p.m. UTC | #4
On Wed, Dec 30, 2015 at 3:16 PM, Geliang Tang <geliangtang@163.com> wrote:

> Use irq_data_get_chip_type() instead of container_of().
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Patch applied with Grygorii's and Santosh's tags.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 65ebaef..aaa1a249 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -435,8 +435,7 @@  static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq)
 {
 	static struct irq_chip_type gpio_unbanked;
 
-	gpio_unbanked = *container_of(irq_get_chip(irq),
-				      struct irq_chip_type, chip);
+	gpio_unbanked = *irq_data_get_chip_type(irq_get_irq_data(irq));
 
 	return &gpio_unbanked.chip;
 };