On 01/10/2018 06:05 AM, Andrew Lunn wrote:
>>>> +static int m88e6390_hwmon_probe(struct phy_device *phydev)
>>>> +{
>>>> +  return marvell_hwmon_probe(phydev, &m88e6390_hwmon_chip_info);
>>>> +}
>>>>  #else
>>>>  static int m88e1121_hwmon_probe(struct phy_device *phydev)
>>>>  {
>>>> @@ -1794,6 +1927,11 @@ static int m88e1510_hwmon_probe(struct phy_device 
>>>> *phydev)
>>>>  {
>>>>    return 0;
>>>>  }
>>>> +
>>>> +static int m88e6390_hwmon_probe(struct phy_device *phydev)
>>>> +{
>>>> +  return 0;
>>>> +}
>>>
>>> Instead of having to define m88e6390_hwmon_probe() twice, I would just
>>> make marvell_hwmon_probe() a stub when CONFIG_HWMON=n?
>>
>> Yes, i could do that. But again, i'm just following the pattern from
>> the other two sensors.
> 
> Humm, actually, no. It makes it more complex. If marvell_hwmon_probe()
> is a stub, and we keep m88e6390_hwmon_probe() as the real
> implementation, it means we need m88e6390_hwmon_chip_info, so we can
> pass it. Either i need a stub version of m88e6390_hwmon_chip_info, or
> i just build all the hwmon code even when CONFIG_HWMON is
> disabled. The compiler might be able to figure out it is all unused
> and throw it away, but i doubt it.
> 
> Having m88e6390_hwmon_probe() a stub is much simpler.

Fair enough:

Reviewed-by: Florian Fainelli <f.faine...@gmail.com>
-- 
Florian

Reply via email to