[PATCH v2 2/4] gpio: davinci: DT changes for driver

Sekhar Nori nsekhar at ti.com
Thu Jun 20 00:51:47 EDT 2013


On 6/20/2013 12:40 AM, Linus Walleij wrote:
> On Fri, Jun 14, 2013 at 12:20 PM, Philip Avinash
> <avinashphilipk at gmail.com> wrote:
> 
>> From: KV Sujith <sujithkv at ti.com>
>>
>> - Add of_device_id for Davinci GPIO driver.
>> - Add function to populate data from DT.
>> - Modify the probe to read from DT if DT match is found.
>> - Add DT binding documentation for Davinci GPIO properties in a new file
>>   gpio-davinci.txt located at Documentation/devicetree/bindings/gpio/.
>>
>> Signed-off-by: KV Sujith <sujithkv at ti.com>
>> Signed-off-by: Philip Avinash <avinashphilip at ti.com>
>> ---
>> Changes since v1:
>>         - description for interrupts changed to reflecti
>>            interrupt array usage.
> (...)
> 
>> +static struct davinci_gpio_platform_data *davinci_gpio_set_pdata_of(
>> +                                               struct platform_device *pdev)
>> +{
>> +       struct device_node *dn = pdev->dev.of_node;
>> +       struct davinci_gpio_platform_data *pdata;
>> +       u32 val, ret;
>> +
>> +       pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
>> +       if (pdata) {
> 
> Instead of this arrow pattern:
> 
> if (!pdata) {
>   dev_err( ... "out of memory allocating platform data");
>   return NULL;
> }
> 
> And de-indent the rest.
> 
> With that change:
> Acked-by: Linus Walleij <linus.walleij at linaro.org>
> 
> I guess this may go through the DaVinci tree with the rest of the DaVinci
> patches?

Linus, yes, I will pick these up with your acks.

Thanks,
Sekhar



More information about the linux-arm-kernel mailing list