mtd: fix section mismatch for doc_probe_device
authorRyosuke Saito <raitosyo@gmail.com>
Thu, 15 Mar 2012 10:19:03 +0000 (19:19 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 27 Mar 2012 00:00:55 +0000 (01:00 +0100)
doc_probe_device() is only called from docg3_probe() which is in .init.text,
so it must be in the same section to avoid a section mismatch warning.

Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/docg3.c

index 349bbfa..f5930ca 100644 (file)
@@ -1847,8 +1847,8 @@ static void __init doc_set_driver_info(int chip_id, struct mtd_info *mtd)
  * if a memory allocation failed. If floor 0 is checked, a reset of the ASIC is
  * launched.
  */
-static struct mtd_info *doc_probe_device(void __iomem *base, int floor,
-                                        struct device *dev)
+static struct mtd_info * __init
+doc_probe_device(void __iomem *base, int floor, struct device *dev)
 {
        int ret, bbt_nbpages;
        u16 chip_id, chip_id_inv;