~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/mtd/maps/wr_sbc82xx_flash.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
                nr_parts = parse_mtd_partitions(sbcmtd[i], part_probes,
133
133
                                                &sbcmtd_parts[i], 0);
134
134
                if (nr_parts > 0) {
135
 
                        add_mtd_partitions (sbcmtd[i], sbcmtd_parts[i], nr_parts);
 
135
                        mtd_device_register(sbcmtd[i], sbcmtd_parts[i],
 
136
                                            nr_parts);
136
137
                        continue;
137
138
                }
138
139
 
139
140
                /* No partitioning detected. Use default */
140
141
                if (i == 2) {
141
 
                        add_mtd_device(sbcmtd[i]);
 
142
                        mtd_device_register(sbcmtd[i], NULL, 0);
142
143
                } else if (i == bigflash) {
143
 
                        add_mtd_partitions (sbcmtd[i], bigflash_parts, ARRAY_SIZE(bigflash_parts));
 
144
                        mtd_device_register(sbcmtd[i], bigflash_parts,
 
145
                                            ARRAY_SIZE(bigflash_parts));
144
146
                } else {
145
 
                        add_mtd_partitions (sbcmtd[i], smallflash_parts, ARRAY_SIZE(smallflash_parts));
 
147
                        mtd_device_register(sbcmtd[i], smallflash_parts,
 
148
                                            ARRAY_SIZE(smallflash_parts));
146
149
                }
147
150
        }
148
151
        return 0;
157
160
                        continue;
158
161
 
159
162
                if (i<2 || sbcmtd_parts[i])
160
 
                        del_mtd_partitions(sbcmtd[i]);
 
163
                        mtd_device_unregister(sbcmtd[i]);
161
164
                else
162
 
                        del_mtd_device(sbcmtd[i]);
 
165
                        mtd_device_unregister(sbcmtd[i]);
163
166
 
164
167
                kfree(sbcmtd_parts[i]);
165
168
                map_destroy(sbcmtd[i]);