Skip to content

Commit

Permalink
[PATCH] spi_s3c24xx.c: warning fix
Browse files Browse the repository at this point in the history
The set_cs field of struct s3c24xx_spi is declared as returning a int but
the value returned but set_cs is never fixed.  Moreover, the default
function for set_cs and the set_cs defintion in the platform data are
returning void.

I'm proposing to change the prototype to void (*set_cs)(...). By doing
this, I'm also fixing 2 build warnings:

  drivers/spi/spi_s3c24xx.c: In function 's3c24xx_spi_probe':
  drivers/spi/spi_s3c24xx.c:330: warning: assignment from incompatible pointer type
  drivers/spi/spi_s3c24xx.c:335: warning: assignment from incompatible pointer type

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Arnaud Patard (Rtp authored and Linus Torvalds committed Mar 17, 2007
1 parent d1cabd6 commit 6c912a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_s3c24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct s3c24xx_spi {
int len;
int count;

int (*set_cs)(struct s3c2410_spi_info *spi,
void (*set_cs)(struct s3c2410_spi_info *spi,
int cs, int pol);

/* data buffers */
Expand Down

0 comments on commit 6c912a3

Please sign in to comment.