[PATCH] SPI cleanup() method param becomes non-const
authorHans-Peter Nilsson <hans-peter.nilsson@axis.com>
Mon, 12 Feb 2007 08:52:45 +0000 (00:52 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 12 Feb 2007 17:48:31 +0000 (09:48 -0800)
commit0ffa0285052607513a29f529ddb5061c907fd8a6
treed7072494d6d8005c60d42c1c841628c7d486dd9a
parent7f8c7619ea1ff5ab8e0b08c8120d629834ef4253
[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>
drivers/spi/pxa2xx_spi.c
drivers/spi/spi.c
drivers/spi/spi_bitbang.c
include/linux/spi/spi.h
include/linux/spi/spi_bitbang.h