Re: [PATCH] Input: twl4030-vibra: remove legacy pdata support

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

 



Hi Dmitry,

On Wed, Nov 23, 2016 at 3:33 AM, Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
>> > -static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
>> > -                         struct device_node *node)
>> > +static bool twl4030_vibra_check_coexist(struct device_node *node)
>> >  {
>> > -   if (pdata && pdata->coexist)
>> > -           return true;
>> > -
>> >     node = of_find_node_by_name(node, "codec");
>> >     if (node) {
>> >             of_node_put(node);
>
> Do we need this wrapper anymore?
>
I kept the original logic.
It seems that when there's also a "codec" DT entry, the logic is different.

>> > @@ -194,13 +190,12 @@ static bool twl4030_vibra_check_coexist(struct twl4030_vibra_data *pdata,
>> >
>> >  static int twl4030_vibra_probe(struct platform_device *pdev)
>> >  {
>> > -   struct twl4030_vibra_data *pdata = dev_get_platdata(&pdev->dev);
>
> Should we also remove twl4030_vibra_data definition?
>
Yes, but that is defined in include/linux/i2c/twl.h. Since I've sent
multiple cleanup patches regarding twl, I thought it would be wise to
wait until the next cycle to remove them all to avoid merge conflicts.
I don't know how I should go with this, since I could:
a) make another commit removing the pdata definition
b) include the pdata definition removal in this commit
c) wait until the next cycle

>> >     struct device_node *twl4030_core_node = pdev->dev.parent->of_node;
>> >     struct vibra_info *info;
>> >     int ret;
>> >
>> > -   if (!pdata && !twl4030_core_node) {
>> > -           dev_dbg(&pdev->dev, "platform_data not available\n");
>> > +   if (!twl4030_core_node) {
>> > +           dev_err(&pdev->dev, "no DT info\n\n");
>
> Why double newline?
This is a typo. Should I send v2 or you can modify it while applying?

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



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux