]> git.ipfire.org Git - people/arne_f/kernel.git/commit
mtd: m25p80: Fix module aliases for m25p80
authorBen Hutchings <ben@decadent.org.uk>
Tue, 11 Nov 2014 22:11:52 +0000 (14:11 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 18:10:38 +0000 (10:10 -0800)
commit89b0d0d828f84827f248db70a8f3da08c019b662
tree87fdd87b6603a264661ecf3b567510295f62e3b7
parent16b5dbc6323d3293004671b864bf2f1768b91504
mtd: m25p80: Fix module aliases for m25p80

Based on a5b7616c55e188fe3d6ef686bef402d4703ecb62, but backported so
that a bunch of dependencies are not needed.

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")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[Brian: backport without the dependencies]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/devices/m25p80.c