diff options
author | Hans-Peter Nilsson | 2007-02-12 09:52:45 +0100 |
---|---|---|
committer | Linus Torvalds | 2007-02-12 18:48:31 +0100 |
commit | 0ffa0285052607513a29f529ddb5061c907fd8a6 (patch) | |
tree | d7072494d6d8005c60d42c1c841628c7d486dd9a /include/linux/spi/spi.h | |
parent | [PATCH] spi_bitbang(): use overridable setup_transfer() method (diff) | |
download | kernel-qcow2-linux-0ffa0285052607513a29f529ddb5061c907fd8a6.tar.gz kernel-qcow2-linux-0ffa0285052607513a29f529ddb5061c907fd8a6.tar.xz kernel-qcow2-linux-0ffa0285052607513a29f529ddb5061c907fd8a6.zip |
[PATCH] SPI cleanup() method param becomes non-const
I'd like to assign NULL to kfree()d members of a structure. I can't do
that without ugly casting (see the PXA patch) when the structure pointed to
is const-qualified. I don't really see a reason why the cleanup method
isn't allowed to alter the object it should clean up. :-)
No, I didn't test the PXA patch, but I verified that the NULL-assignment
doesn't stop me from doing rmmod/insmodding my own spi_bitbang-based
driver.
Signed-off-by: Hans-Peter Nilsson <hp@axis.com>
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>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r-- | include/linux/spi/spi.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 851b25d6e82b..9d8d63109a8f 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -220,7 +220,7 @@ struct spi_master { struct spi_message *mesg); /* called on release() to free memory provided by spi_master */ - void (*cleanup)(const struct spi_device *spi); + void (*cleanup)(struct spi_device *spi); }; static inline void *spi_master_get_devdata(struct spi_master *master) |