Re: [PATCH v2] hwmon: (core) Use device name as a fallback in devm_hwmon_device_register_with_info

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

 



On Thu, Jan 09, 2025 at 08:53:55PM +0100, Heiner Kallweit wrote:
> A number of network PHY drivers use the following code:
> 
> name = devm_hwmon_sanitize_name(dev, dev_name(dev));
> if (IS_ERR(name))
> 	return PTR_ERR(name);
> devm_hwmon_device_register_with_info(dev, name, ..);
> 
> Make this a generic fallback option and use the device name if no name
> is provided to devm_hwmon_device_register_with_info(). This would allow
> to simplify the affected drivers.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>

Applied, after updating the API document to reflect that NULL may be passed
as hwmon device name.

Guenter




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux