mmc: au1xmmc: force non-modular build and remove symbol_get usage
commit d4a5c59a955bba96b273ec1a5885bada24c56979 upstream. au1xmmc is split somewhat awkwardly into the main mmc subsystem driver, and callbacks in platform_data that sit under arch/mips/ and are always built in. The latter than call mmc_detect_change through symbol_get. Remove the use of symbol_get by requiring the driver to be built in. In the future the interrupt handlers for card insert/eject detection should probably be moved into the main driver, and which point it can be built modular again. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Manuel Lauss <manuel.lauss@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> [mcgrof: squashed in depends on MMC=y suggested by Arnd] Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7a67c5d932
commit
6b39bd898b
@ -14,7 +14,6 @@
|
|||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/pm.h>
|
#include <linux/pm.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
@ -167,12 +166,7 @@ static struct platform_device db1x00_audio_dev = {
|
|||||||
|
|
||||||
static irqreturn_t db1100_mmc_cd(int irq, void *ptr)
|
static irqreturn_t db1100_mmc_cd(int irq, void *ptr)
|
||||||
{
|
{
|
||||||
void (*mmc_cd)(struct mmc_host *, unsigned long);
|
mmc_detect_change(ptr, msecs_to_jiffies(500));
|
||||||
/* link against CONFIG_MMC=m */
|
|
||||||
mmc_cd = symbol_get(mmc_detect_change);
|
|
||||||
mmc_cd(ptr, msecs_to_jiffies(500));
|
|
||||||
symbol_put(mmc_detect_change);
|
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
@ -340,14 +339,7 @@ static irqreturn_t db1200_mmc_cd(int irq, void *ptr)
|
|||||||
|
|
||||||
static irqreturn_t db1200_mmc_cdfn(int irq, void *ptr)
|
static irqreturn_t db1200_mmc_cdfn(int irq, void *ptr)
|
||||||
{
|
{
|
||||||
void (*mmc_cd)(struct mmc_host *, unsigned long);
|
mmc_detect_change(ptr, msecs_to_jiffies(200));
|
||||||
|
|
||||||
/* link against CONFIG_MMC=m */
|
|
||||||
mmc_cd = symbol_get(mmc_detect_change);
|
|
||||||
if (mmc_cd) {
|
|
||||||
mmc_cd(ptr, msecs_to_jiffies(200));
|
|
||||||
symbol_put(mmc_detect_change);
|
|
||||||
}
|
|
||||||
|
|
||||||
msleep(100); /* debounce */
|
msleep(100); /* debounce */
|
||||||
if (irq == DB1200_SD0_INSERT_INT)
|
if (irq == DB1200_SD0_INSERT_INT)
|
||||||
@ -431,14 +423,7 @@ static irqreturn_t pb1200_mmc1_cd(int irq, void *ptr)
|
|||||||
|
|
||||||
static irqreturn_t pb1200_mmc1_cdfn(int irq, void *ptr)
|
static irqreturn_t pb1200_mmc1_cdfn(int irq, void *ptr)
|
||||||
{
|
{
|
||||||
void (*mmc_cd)(struct mmc_host *, unsigned long);
|
mmc_detect_change(ptr, msecs_to_jiffies(200));
|
||||||
|
|
||||||
/* link against CONFIG_MMC=m */
|
|
||||||
mmc_cd = symbol_get(mmc_detect_change);
|
|
||||||
if (mmc_cd) {
|
|
||||||
mmc_cd(ptr, msecs_to_jiffies(200));
|
|
||||||
symbol_put(mmc_detect_change);
|
|
||||||
}
|
|
||||||
|
|
||||||
msleep(100); /* debounce */
|
msleep(100); /* debounce */
|
||||||
if (irq == PB1200_SD1_INSERT_INT)
|
if (irq == PB1200_SD1_INSERT_INT)
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/ata_platform.h>
|
#include <linux/ata_platform.h>
|
||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/platnand.h>
|
#include <linux/mtd/platnand.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
@ -459,14 +458,7 @@ static irqreturn_t db1300_mmc_cd(int irq, void *ptr)
|
|||||||
|
|
||||||
static irqreturn_t db1300_mmc_cdfn(int irq, void *ptr)
|
static irqreturn_t db1300_mmc_cdfn(int irq, void *ptr)
|
||||||
{
|
{
|
||||||
void (*mmc_cd)(struct mmc_host *, unsigned long);
|
mmc_detect_change(ptr, msecs_to_jiffies(200));
|
||||||
|
|
||||||
/* link against CONFIG_MMC=m. We can only be called once MMC core has
|
|
||||||
* initialized the controller, so symbol_get() should always succeed.
|
|
||||||
*/
|
|
||||||
mmc_cd = symbol_get(mmc_detect_change);
|
|
||||||
mmc_cd(ptr, msecs_to_jiffies(200));
|
|
||||||
symbol_put(mmc_detect_change);
|
|
||||||
|
|
||||||
msleep(100); /* debounce */
|
msleep(100); /* debounce */
|
||||||
if (irq == DB1300_SD1_INSERT_INT)
|
if (irq == DB1300_SD1_INSERT_INT)
|
||||||
|
@ -466,11 +466,12 @@ config MMC_ALCOR
|
|||||||
of Alcor Micro PCI-E card reader
|
of Alcor Micro PCI-E card reader
|
||||||
|
|
||||||
config MMC_AU1X
|
config MMC_AU1X
|
||||||
tristate "Alchemy AU1XX0 MMC Card Interface support"
|
bool "Alchemy AU1XX0 MMC Card Interface support"
|
||||||
depends on MIPS_ALCHEMY
|
depends on MIPS_ALCHEMY
|
||||||
|
depends on MMC=y
|
||||||
help
|
help
|
||||||
This selects the AMD Alchemy(R) Multimedia card interface.
|
This selects the AMD Alchemy(R) Multimedia card interface.
|
||||||
If you have a Alchemy platform with a MMC slot, say Y or M here.
|
If you have a Alchemy platform with a MMC slot, say Y here.
|
||||||
|
|
||||||
If unsure, say N.
|
If unsure, say N.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user