-+static int __init setup_mtd(void)
-+{
-+ struct hd_struct **part;
-+ int num = 0, i;
-+ char initstr[64];
-+
-+ if (cf_slot0_data.gd == NULL)
-+ return 0;
-+
-+ /* count partitions */
-+ part = cf_slot0_data.gd->part;
-+ while (part[num] != NULL) {
-+ num++;
-+ }
-+
-+ if (num < 2)
-+ return 0;
-+
-+ mount_devfs_fs();
-+ printk("Setting up block2mtd devices\n");
-+
-+ block2mtd_setup("/dev/cf/card0/part1,131072,kernel");
-+ block2mtd_setup("/dev/cf/card0/part2,131072,rootfs");
-+
-+ for (i = 2; part[i]; i++) {
-+ sprintf(initstr, "/dev/cf/card0/part%d,131072,part%d", i + 1, i + 1);
-+ block2mtd_setup(initstr);
-+ }
-+
-+ return 0;
-+}
-+
-+late_initcall(setup_mtd);