Re: [PATCH v2 2/3] serial: mxs-auart: Allow device tree probing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 15, 2012 at 8:49 AM, Marek Vasut <marex@xxxxxxx> wrote:

>> +/*
>> + * This function returns 1 if pdev isn't a device instatiated by dt, 0 if
>> it + * could successfully get all information from dt or a negative errno.
>> + */
>> +static int serial_mxs_probe_dt(struct mxs_auart_port *s,
>> +             struct platform_device *pdev)
>> +{
>> +     struct device_node *np = pdev->dev.of_node;
>> +     int ret;
>> +
>> +     if (!np)
>> +             /* no device tree device */
>> +             return 1;
>> +
>> +     ret = of_alias_get_id(np, "serial");
>> +     if (ret < 0) {
>> +             dev_err(&pdev->dev, "failed to get alias id: %d\n", ret);
>> +             return ret;
>> +     }
>> +     s->port.line = ret;
>> +
>> +     return 0;
>> +}
>> +#else
>> +static inline int serial_mxs_probe_dt(struct mxs_auart_port *s,
>> +             struct platform_device *pdev)
>> +{
>> +     return 1;
>> +}
>> +#endif
>
> So drop this whole ifdef stuff ...

Yes, you are right. We can safely remove it. Just tested and it worked fine.

I will drop the ifdef in the next revision.

Thanks,

Fabio Estevam
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux