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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter