]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/spi/spi_s3c24xx_gpio.c
spi: fix platform driver hotplug/coldplug
[linux-2.6-omap-h63xx.git] / drivers / spi / spi_s3c24xx_gpio.c
index 109d82c1abc05a9844578df75f72ad2f80af03ee..e33f6145c56065781b0673f746094172689daad9 100644 (file)
@@ -100,7 +100,6 @@ static int s3c2410_spigpio_probe(struct platform_device *dev)
        struct spi_master       *master;
        struct s3c2410_spigpio  *sp;
        int ret;
-       int i;
 
        master = spi_alloc_master(&dev->dev, sizeof(struct s3c2410_spigpio));
        if (master == NULL) {
@@ -143,17 +142,6 @@ static int s3c2410_spigpio_probe(struct platform_device *dev)
        if (ret)
                goto err_no_bitbang;
 
-       /* register the chips to go with the board */
-
-       for (i = 0; i < sp->info->board_size; i++) {
-               dev_info(&dev->dev, "registering %p: %s\n",
-                        &sp->info->board_info[i],
-                        sp->info->board_info[i].modalias);
-
-               sp->info->board_info[i].controller_data = sp;
-               spi_new_device(master, sp->info->board_info + i);
-       }
-
        return 0;
 
  err_no_bitbang:
@@ -180,6 +168,8 @@ static int s3c2410_spigpio_remove(struct platform_device *dev)
 #define s3c2410_spigpio_suspend NULL
 #define s3c2410_spigpio_resume NULL
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:spi_s3c24xx_gpio");
 
 static struct platform_driver s3c2410_spigpio_drv = {
        .probe          = s3c2410_spigpio_probe,