serial: ifx6x60: fix paging fault on spi_register_driver
PATCH 1/1 serial: ifx6x60: fix paging fault on spi_register_driver
[ 117.240866] BUG: unable to handle kernel paging request at 815b627c [ 117.240866] IP: [<813fe94b>] spi_register_driver+0xb/0x50 ... [ 117.240866] Call Trace: [ 117.240866] [<817de977>] ifx_spi_init+0xbe/0xf0
The root cause is, spi_register_driver() is trying to write into the passed *const* struct spi_driver.
Signed-off-by Fengguang Wu <[email protected]>
--- drivers/tty/serial/ifx6x60.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/ifx6x60.c +1 -1
@@ -1331,7 +1331,7 @@ static const struct spi_device_id ifx_idMODULE_DEVICE_TABLE (spi, ifx_id_table);/* spi operations */ -static const struct spi_driver ifx_spi_driver = { +static struct spi_driver ifx_spi_driver = { .driver = { .name =DRVNAME , .pm = &ifx_spi_pm,
Quoted 10 lines · On Tue, 7 Aug 2012 13:12:47 +0800 Fengguang Wu <[email protected]> wrote:
[ 117.240866] BUG: unable to handle kernel paging request at 815b627c [ 117.240866] IP: [<813fe94b>] spi_register_driver+0xb/0x50 ... [ 117.240866] Call Trace: [ 117.240866] [<817de977>] ifx_spi_init+0xbe/0xf0The root cause is,
spi_register_driver()is trying to write into the passed *const* structspi_driver.Signed-off-by Fengguang Wu <[email protected]>
Acked-by Alan Cox <[email protected]>