2019-05-20 00:49:11

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 1/2] eeprom: at24: use devm_i2c_new_dummy_device()


> Now that it's upstream, use the resource managed version
> of i2c_new_dummy().

That was fast :)

> - dummy_client = i2c_new_dummy(base_client->adapter,
> - base_client->addr + index);
> + dummy_client = devm_i2c_new_dummy_device(dev, base_client->adapter,
> + base_client->addr + index);
> if (!dummy_client) {

Oh well, the confusion starts already :/ devm_i2c_new_dummy_device()
returns an ERR_PTR.


Attachments:
(No filename) (437.00 B)
signature.asc (849.00 B)
Download all attachments

2019-05-20 07:09:02

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH 1/2] eeprom: at24: use devm_i2c_new_dummy_device()

niedz., 19 maj 2019 o 22:52 Wolfram Sang <[email protected]> napisaƂ(a):
>
>
> > Now that it's upstream, use the resource managed version
> > of i2c_new_dummy().
>
> That was fast :)
>
> > - dummy_client = i2c_new_dummy(base_client->adapter,
> > - base_client->addr + index);
> > + dummy_client = devm_i2c_new_dummy_device(dev, base_client->adapter,
> > + base_client->addr + index);
> > if (!dummy_client) {
>
> Oh well, the confusion starts already :/ devm_i2c_new_dummy_device()
> returns an ERR_PTR.
>

Ugh, sorry for that, especially since I followed the discussion on
that series. :(

I should not be sending out patches late on Sundays I guess.

Bart