Re: [PATCH 8/9] net: phy: micrel: clean up led-mode setup
From: Johan Hovold
Date: Wed Nov 12 2014 - 04:30:41 EST
On Tue, Nov 11, 2014 at 01:43:06PM -0800, Florian Fainelli wrote:
> On 11/11/2014 01:41 PM, Sergei Shtylyov wrote:
> > Hello.
> >
> > On 11/11/2014 10:00 PM, Johan Hovold wrote:
> >
> >> Clean up led-mode setup by introducing proper defines for PHY Control
> >> registers 1 and 2 and only passing the register to the setup function.
> >
> > Not sure that's really better that it was before (modulo naming).
>
> We do have proper error handling in kszphy_setup_led() which is already
> an improvement.
This also means handling the led mode in one place rather than spreading
it all over the driver, with multiple config functions providing one of
the same two combinations of register and shift.
It's usefulness will perhaps become more apparent if you look at the
follow up patches, which does further refactoring and store the led-mode
register in the type data.
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/