hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/mips/alchemy/devboards/db1200.c
....@@ -10,7 +10,6 @@
1010 #include <linux/gpio.h>
1111 #include <linux/i2c.h>
1212 #include <linux/init.h>
13
-#include <linux/module.h>
1413 #include <linux/interrupt.h>
1514 #include <linux/io.h>
1615 #include <linux/leds.h>
....@@ -327,6 +326,7 @@
327326
328327 /**********************************************************************/
329328
329
+#ifdef CONFIG_MMC_AU1X
330330 /* SD carddetects: they're supposed to be edge-triggered, but ack
331331 * doesn't seem to work (CPLD Rev 2). Instead, the screaming one
332332 * is disabled and its counterpart enabled. The 200ms timeout is
....@@ -340,14 +340,7 @@
340340
341341 static irqreturn_t db1200_mmc_cdfn(int irq, void *ptr)
342342 {
343
- void (*mmc_cd)(struct mmc_host *, unsigned long);
344
-
345
- /* link against CONFIG_MMC=m */
346
- mmc_cd = symbol_get(mmc_detect_change);
347
- if (mmc_cd) {
348
- mmc_cd(ptr, msecs_to_jiffies(200));
349
- symbol_put(mmc_detect_change);
350
- }
343
+ mmc_detect_change(ptr, msecs_to_jiffies(200));
351344
352345 msleep(100); /* debounce */
353346 if (irq == DB1200_SD0_INSERT_INT)
....@@ -431,14 +424,7 @@
431424
432425 static irqreturn_t pb1200_mmc1_cdfn(int irq, void *ptr)
433426 {
434
- void (*mmc_cd)(struct mmc_host *, unsigned long);
435
-
436
- /* link against CONFIG_MMC=m */
437
- mmc_cd = symbol_get(mmc_detect_change);
438
- if (mmc_cd) {
439
- mmc_cd(ptr, msecs_to_jiffies(200));
440
- symbol_put(mmc_detect_change);
441
- }
427
+ mmc_detect_change(ptr, msecs_to_jiffies(200));
442428
443429 msleep(100); /* debounce */
444430 if (irq == PB1200_SD1_INSERT_INT)
....@@ -599,6 +585,7 @@
599585 .num_resources = ARRAY_SIZE(au1200_mmc1_res),
600586 .resource = au1200_mmc1_res,
601587 };
588
+#endif /* CONFIG_MMC_AU1X */
602589
603590 /**********************************************************************/
604591
....@@ -766,7 +753,9 @@
766753 static struct platform_device *db1200_devs[] __initdata = {
767754 NULL, /* PSC0, selected by S6.8 */
768755 &db1200_ide_dev,
756
+#ifdef CONFIG_MMC_AU1X
769757 &db1200_mmc0_dev,
758
+#endif
770759 &au1200_lcd_dev,
771760 &db1200_eth_dev,
772761 &db1200_nand_dev,
....@@ -777,7 +766,9 @@
777766 };
778767
779768 static struct platform_device *pb1200_devs[] __initdata = {
769
+#ifdef CONFIG_MMC_AU1X
780770 &pb1200_mmc1_dev,
771
+#endif
781772 };
782773
783774 /* Some peripheral base addresses differ on the PB1200 */