lkml.org 
[lkml]   [2008]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/5] spi: Add OF binding support for SPI busses
On Wed, Jul 02, 2008 at 11:02:23PM -0400, Jon Smirl wrote:
> On 7/2/08, Grant Likely <grant.likely@secretlab.ca> wrote:
> > From: Grant Likely <grant.likely@secretlab.ca>
> >
> > This patch adds support for populating an SPI bus based on data in the
> > OF device tree. This is useful for powerpc platforms which use the
> > device tree instead of discrete code for describing platform layout.
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > ---
> > + /* Select device driver */
> > + sprop = of_get_property(nc, "linux,modalias", &len);
> > + if (sprop && len > 0)
> > + strncpy(spi->modalias, sprop, KOBJ_NAME_LEN);
> > + else
> > + strncpy(spi->modalias, "spidev", KOBJ_NAME_LEN);
>
> You're missing a request_module("%s", info.type) to make sure the
> module is loaded.
>
> It might make sense to share code with of_find_i2c_driver() so we have
> a common way of guessing module names.

You're right. I've refactored the i2c code to make it usable by SPI
also. I'll post the new patch series this evening.

g.


\
 
 \ /
  Last update: 2008-07-12 07:25    [W:2.105 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site