From 0ffa0285052607513a29f529ddb5061c907fd8a6 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 12 Feb 2007 00:52:45 -0800 Subject: [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 Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi_bitbang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/spi/spi_bitbang.c') diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index a5dadc7..24a330d 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c @@ -238,7 +238,7 @@ EXPORT_SYMBOL_GPL(spi_bitbang_setup); /** * spi_bitbang_cleanup - default cleanup for per-word I/O loops */ -void spi_bitbang_cleanup(const struct spi_device *spi) +void spi_bitbang_cleanup(struct spi_device *spi) { kfree(spi->controller_state); } -- cgit v1.1