On 03/10/2022 19:01, Guenter Roeck wrote:
On Sun, Oct 02, 2022 at 06:43:02PM +0100, Ahmad Khalifa wrote:
Check if there is a valid device before using force_id parameter value
in order to avoid registering two devices.
For the subject, please use "hwmon: (it87) ..."
in the future.
Will do with v3 of the patch.
+ /* check first so force_id doesn't register a second empty device */
The reasoning is wrong: the ID is checked to avoid registering a
non-existing or a completely incompatible device. It doesn't matter
if the skipped device is the first or the second device.
Non-existing is more accurate than empty, I can change to that in v3
The physical device doesn't exist, but the platform device is registered
with no attributes.
--
Regards,
Ahmad