]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: m25p80,spi-nor: Fix module aliases for m25p80
authorBen Hutchings <ben@decadent.org.uk>
Tue, 30 Sep 2014 02:14:55 +0000 (03:14 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 21 Oct 2014 20:46:03 +0000 (13:46 -0700)
commita5b7616c55e188fe3d6ef686bef402d4703ecb62
tree914866866e05332cbbcfb9f70c75212a622ffb2a
parent70f3ce0510afdad7cbaf27ab7ab961377205c782
mtd: m25p80,spi-nor: Fix module aliases for m25p80

m25p80's device ID table is now spi_nor_ids, defined in spi-nor.  The
MODULE_DEVICE_TABLE() macro doesn't work with extern definitions, but
its use was also removed at the same time.  Now if m25p80 is built as
a module it doesn't get the necessary aliases to be loaded
automatically.

A clean solution to this will involve defining the list of device
IDs in spi-nor.h and removing struct spi_device_id from the spi-nor
API, but this is quite a large change.

As a quick fix suitable for stable, copy the device IDs back into
m25p80.

Fixes: 03e296f613af ("mtd: m25p80: use the SPI nor framework")
Cc: <stable@vger.kernel.org> # 3.16.x: 32f1b7c8352f: mtd: move support for struct flash_platform_data into m25p80
Cc: <stable@vger.kernel.org> # 3.16.x: 90e55b3812a1: mtd: m25p80: get rid of spi_get_device_id
Cc: <stable@vger.kernel.org> # 3.16.x: 70f3ce0510af: mtd: spi-nor: make spi_nor_scan() take a chip type name, not spi_device_id
Cc: <stable@vger.kernel.org> # 3.16.x
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/devices/m25p80.c
drivers/mtd/spi-nor/spi-nor.c
include/linux/mtd/spi-nor.h