From akpm@osdl.org Wed Jan 11 13:10:30 2006 Message-Id: <200601111924.k0BJO3aA003076@shell0.pdx.osdl.net> From: Andrew Morton Subject: spi: remove fastcall crap To: greg@kroah.com Cc: akpm@osdl.org, david-b@pacbell.net Date: Wed, 11 Jan 2006 11:23:49 -0800 From: Andrew Morton gcc4 generates warnings when a non-FASTCALL function pointer is assigned to a FASTCALL one. Perhaps it has taste. Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi.c | 7 ++++++- include/linux/spi/spi.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) --- gregkh-2.6.orig/include/linux/spi/spi.h +++ gregkh-2.6/include/linux/spi/spi.h @@ -374,7 +374,7 @@ struct spi_message { */ /* completion is reported through a callback */ - void FASTCALL((*complete)(void *context)); + void (*complete)(void *context); void *context; unsigned actual_length; int status; --- gregkh-2.6.orig/drivers/spi/spi.c +++ gregkh-2.6/drivers/spi/spi.c @@ -480,6 +480,11 @@ EXPORT_SYMBOL_GPL(spi_busnum_to_master); /*-------------------------------------------------------------------------*/ +static void spi_complete(void *arg) +{ + complete(arg); +} + /** * spi_sync - blocking/synchronous SPI data transfers * @spi: device with which data will be exchanged @@ -508,7 +513,7 @@ int spi_sync(struct spi_device *spi, str DECLARE_COMPLETION(done); int status; - message->complete = (void (*)(void *)) complete; + message->complete = spi_complete; message->context = &done; status = spi_async(spi, message); if (status == 0)