From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Fri, 24 Dec 2010 12:09:17 -0500 Subject: [U-Boot] [PATCH 2/4] spi: add spi_set_speed func In-Reply-To: <1293174969-18653-3-git-send-email-thomas@wytron.com.tw> References: <1293174969-18653-1-git-send-email-thomas@wytron.com.tw> <1293174969-18653-3-git-send-email-thomas@wytron.com.tw> Message-ID: <201012241209.18236.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, December 24, 2010 02:16:07 Thomas Chou wrote: > --- /dev/null > +++ b/drivers/spi/spi.c > @@ -0,0 +1,9 @@ > +#include > +#include > + > +/* default func for SPI driver without set speed func */ > +static void __spi_set_speed(struct spi_slave *slave, uint hz) > +{ > +} > +void spi_set_speed(struct spi_slave *slave, uint hz) > + __attribute__((weak, alias("__spi_set_speed"))); let's not go this route. just add the prototype to the header and when the respective spi bus maintainer wants to support this new func, they can implement it. i'd rather people know about the problem up front rather than have things randomly not work. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20101224/9999498e/attachment.pgp