Re: [patch 2.6.28-rc7] regulator: catch some registration errors

From: Mark Brown
Date: Thu Dec 04 2008 - 06:12:48 EST


On Wed, Dec 03, 2008 at 09:48:41PM +0000, Liam Girdwood wrote:

> I wonder if there is another way to approach this as I do agree that
> passing NULL is probably not the best solution. Alternatives like
> embedding struct device with the CPUfreq core or adding a regulator_get
> API call for CPUfreq drivers all involve some work. Fwiw, I'd be happy
> enough with the latter option.

We could also accept the NULL but warn when doing so, perhaps also
adding a dummy device from the regulator core for the logging. That'd
provide some pushback on cpufreq to move to the device model if nobody
is able to convert it right now.

On the bright side, looking at the situation with the clock API there
don't seem to be any other substantial offenders here. Most of the
other users are part of the platform code and get to peer inside the
clocking structure, so if cpufreq were fixed there shouldn't be much
problem here.
--
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/