[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeeF4eNjyhhBxocRXboN3fRY=RjrT6QQ72=QJ-s8gvSfA@mail.gmail.com>
Date: Mon, 11 Jun 2018 15:54:36 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
Lee Jones <lee.jones@...aro.org>,
Rob Herring <robh@...nel.org>, Johan Hovold <johan@...nel.org>
Subject: Re: [PATCH v2 21/24] rave-sp: Support for variants on modalias drivers
On Mon, Jun 11, 2018 at 2:52 PM, Ricardo Ribalda Delgado
<ricardo.ribalda@...il.com> wrote:
> Rave-sp behaves differently based on the device variant.
> sp->variant = of_device_get_match_data(dev);
> + if (!sp->variant) {
> + id = serdev_match_id(rave_sp_serdev_id, serdev);
I think you may leave the ID table where it is in the code and use link.
> + if (id)
> + sp->variant = (const struct rave_sp_variant *)
> + id->driver_data;
> + }
Perhaps a helper like it's done for ACPI / OF cases?
[device_get_match_data() -> ]
of_fwnode_device_get_match_data()
acpi_fwnode_device_get_match_data()
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists