Some places in the spi core pass in a const pointer to a device and the
default container_of() casts that away, which is not a good idea.
Preserve the proper const attribute by using container_of_const() for
to_spi_device() instead, which is what it was designed for.
Note, this removes the NULL check for a device pointer in the call, but
no one was ever checking for that return value, and a device pointer
should never be NULL overall anyway, so this should be a safe change.
Cc: Mark Brown <broonie@kernel.org>
Fixes:
|
||
|---|---|---|
| .. | ||
| offload | ||
| ad7877.h | ||
| ads7846.h | ||
| altera.h | ||
| at73c213.h | ||
| corgi_lcd.h | ||
| ds1305.h | ||
| eeprom.h | ||
| flash.h | ||
| libertas_spi.h | ||
| max7301.h | ||
| mc33880.h | ||
| mmc_spi.h | ||
| mxs-spi.h | ||
| sh_hspi.h | ||
| sh_msiof.h | ||
| spi-fsl-dspi.h | ||
| spi-mem.h | ||
| spi.h | ||
| spi_bitbang.h | ||
| spi_gpio.h | ||
| spi_oc_tiny.h | ||
| tdo24m.h | ||
| tle62x0.h | ||
| xilinx_spi.h | ||