lkml.org 
[lkml]   [2018]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/2] IIO: st_accel_i2c.c: Use probe_new() instead of probe()
On Wed, Jul 4, 2018 at 9:37 AM, Nikolaus Voss
<nikolaus.voss@loewensteinmedical.de> wrote:
> On Wed, 4 Jul 2018, Andy Shevchenko wrote:
>>
>> On Tue, Jul 3, 2018 at 9:06 AM, Nikolaus Voss
>> <nikolaus.voss@loewensteinmedical.de> wrote:
>>>
>>> struct i2c_device_id argument of probe() is not used, so use probe_new()
>>> instead.
>>>
>>
>> This makes...
>>
>>> MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
>>
>>
>> ...this table obsolete IIUC. At least that's what I did when switched
>> to ->probe_new() in some drivers.
>>
>> If I'm mistaken (again? :-) ) I would hear from someone to point me
>> how it can be used after a switch.
>
>
> It is still used by the i2c-core in i2c_device_match() if DT and ACPI
> matching fails.

> And it is used to create the corresponding modaliases for
> driver loading.

My question is "How?!"
I don't really see any points to match against it after switching to
->probe_new().

Could you point me to the code path in i2c (or OF?) core for that?

> So it is necessary for non-DT/ non-ACPI systems and used for
> fallback matching if no match is found in of_device_ids.


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-07-04 10:59    [W:0.132 / U:3.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site