On Wednesday 23 July 2008, hartleys wrote: > This patch makes the at25 driver call spi_setup before any read/write > access to the eeprom to insure that the device mode and clock is set > correctly.
Why would this be needed though? It was called before probe(), and nothing changed the setup ... so it should still be valid. > Signed-off-by: H Hartley Sweeten <[EMAIL PROTECTED]> > > > --- orig/linux-2.6.25.10/drivers/spi/at25.c 2008-07-02 > 20:46:47.000000000 -0700 > +++ > /home/bigguiness/buildroot/project_build_arm/ep9307/linux-2.6.25.10/driv > ers/spi/at25.c 2008-07-23 10:45:51.000000000 -0700 > @@ -134,6 +134,8 @@ at25_bin_read(struct kobject *kobj, stru > if (unlikely(!count)) > return count; > > + spi_setup(at25->spi); > + > return at25_ee_read(at25, buf, off, count); > } > > @@ -260,6 +262,8 @@ at25_bin_write(struct kobject *kobj, str > if (unlikely(!count)) > return count; > > + spi_setup(at25->spi); > + > return at25_ee_write(at25, buf, off, count); > } > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general