Re: [PATCH v2] iio: adc: max9611: fix module auto-loading

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

 



On Sat, Jan 6, 2018 at 4:14 PM, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> Are you using devicetree or some other method to instantiate the device?
> i.e. How does the kernel know it exists?
>
Yes, I'm using device-tree (in a way like in bindings txt). I have
also max1137 connected, which is loaded and probed well.
Thank you!
Dmitry

>> >> >> > Signed-off-by: Dmitry Mastykin <mastichi@xxxxxxxxx>
>> >> >> > ---
>> >> >> >  drivers/iio/adc/max9611.c | 5 ++---
>> >> >> >  1 file changed, 2 insertions(+), 3 deletions(-)
>> >> >> >
>> >> >> > diff --git a/drivers/iio/adc/max9611.c b/drivers/iio/adc/max9611.c
>> >> >> > index b1dd17c..ce0115a 100644
>> >> >> > --- a/drivers/iio/adc/max9611.c
>> >> >> > +++ b/drivers/iio/adc/max9611.c
>> >> >> > @@ -523,8 +523,7 @@ static const struct of_device_id max9611_of_table[] = {
>> >> >> >  };
>> >> >> >
>> >> >> >  MODULE_DEVICE_TABLE(of, max9611_of_table);
>> >> >> > -static int max9611_probe(struct i2c_client *client,
>> >> >> > -                        const struct i2c_device_id *id)
>> >> >> > +static int max9611_probe(struct i2c_client *client)
>> >> >> >  {
>> >> >> >         const char * const shunt_res_prop = "shunt-resistor-micro-ohms";
>> >> >> >         const struct device_node *of_node = client->dev.of_node;
>> >> >> > @@ -576,7 +575,7 @@ static struct i2c_driver max9611_driver = {
>> >> >> >                    .owner = THIS_MODULE,
>> >> >> >                    .of_match_table = max9611_of_table,
>> >> >> >         },
>> >> >> > -       .probe = max9611_probe,
>> >> >> > +       .probe_new = max9611_probe,
>> >> >> >  };
>> >> >> >  module_i2c_driver(max9611_driver);
>> >> >> >
>> >> >> > --
>> >> >> > 2.7.4
>> >> >> >
>> >
>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux