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

From: David Brownell
Date: Mon Jan 05 2009 - 19:14:59 EST


On Tuesday 02 December 2008, Mark Brown wrote:
> > Also make sure the consumer device is provided.  It's nonsensical
> > to omit these, and not a documented part of the interface.  Since
> > no code in mainline does such stuff, this is just anti-oops medicine.
>
> ...we do still need to cater for cpufreq and other struct deviceless
> consumers.  If you can guarantee that no such consumers will ever exist
> then great but we're not there yet.

Just for the record: my feeling is that since no such
drivers currently use the regulator framework, it's wrong
to design-in breakage to support them.

When someone writes a cpufreq driver that uses the
regulator framework, they can arrange to provide the
relevant "struct device *" to make that work neatly.

Meanwhile, I still think the regulator framework should
be using driver model messages. Since the only reason
not to use them is to support those non-existent drivers.

- Dave

p.s. Glad to see at least part of this patch get merged,
even if related diagnostics are lacking.


--
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/