>> +    devm_hwmon_device_register_with_groups(&aq_nic->pdev->dev,
>> +                                           ndev->name,
>> +                                           dev_get_drvdata(&pdev->dev),
>> +                                           aq_dev_groups);
>> +
> 
> You should be using devm_hwmon_device_register_with_info().
> 
> I'm not sure how good an idea it is use nder->name. systemd is going
> to rename the device, so you have a sensor called eth0, and the
> interface called enp3s0. You might be better to use the pci bus
> address, which is fixed, or add code for the rename notifier, so you
> can destroy and recreate the hwmon device when the interface is
> renamed.

Thanks for the suggestion, I'll investigate.
On my current system I however see it is named correctly after interface rename,
like 'enp1s0-pci-0100'.

> It would also be good to Cc: the HWMON maintainer.

Ok

Regards,
  Igor

Reply via email to