Commit d8929942806270801023c90d78885e5347be718f

Authored by Greg Kroah-Hartman
1 parent b859f15921

Drivers: mtd: remove __dev* attributes.

CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
markings need to be removed.

This change removes the use of __devinit, __devexit_p, and __devexit
from these drivers.

Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 14 changed files with 37 additions and 43 deletions Side-by-side Diff

drivers/mtd/devices/mtd_dataflash.c
... ... @@ -618,9 +618,8 @@
618 618 /*
619 619 * Register DataFlash device with MTD subsystem.
620 620 */
621   -static int
622   -add_dataflash_otp(struct spi_device *spi, char *name,
623   - int nr_pages, int pagesize, int pageoffset, char revision)
  621 +static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages,
  622 + int pagesize, int pageoffset, char revision)
624 623 {
625 624 struct dataflash *priv;
626 625 struct mtd_info *device;
... ... @@ -679,9 +678,8 @@
679 678 return err;
680 679 }
681 680  
682   -static inline int
683   -add_dataflash(struct spi_device *spi, char *name,
684   - int nr_pages, int pagesize, int pageoffset)
  681 +static inline int add_dataflash(struct spi_device *spi, char *name,
  682 + int nr_pages, int pagesize, int pageoffset)
685 683 {
686 684 return add_dataflash_otp(spi, name, nr_pages, pagesize,
687 685 pageoffset, 0);
drivers/mtd/devices/spear_smi.c
... ... @@ -757,7 +757,7 @@
757 757  
758 758 #ifdef CONFIG_OF
759 759 static int spear_smi_probe_config_dt(struct platform_device *pdev,
760   - struct device_node *np)
  760 + struct device_node *np)
761 761 {
762 762 struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev);
763 763 struct device_node *pp = NULL;
... ... @@ -800,7 +800,7 @@
800 800 }
801 801 #else
802 802 static int spear_smi_probe_config_dt(struct platform_device *pdev,
803   - struct device_node *np)
  803 + struct device_node *np)
804 804 {
805 805 return -ENOSYS;
806 806 }
drivers/mtd/maps/esb2rom.c
... ... @@ -145,7 +145,7 @@
145 145 }
146 146  
147 147 static int esb2rom_init_one(struct pci_dev *pdev,
148   - const struct pci_device_id *ent)
  148 + const struct pci_device_id *ent)
149 149 {
150 150 static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
151 151 struct esb2rom_window *window = &esb2rom_window;
drivers/mtd/maps/intel_vr_nor.c
... ... @@ -189,8 +189,7 @@
189 189 pci_disable_device(dev);
190 190 }
191 191  
192   -static int
193   -vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
  192 +static int vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
194 193 {
195 194 struct vr_nor_mtd *p = NULL;
196 195 unsigned int exp_timing_cs0;
drivers/mtd/maps/pci.c
... ... @@ -253,8 +253,7 @@
253 253 * Generic code follows.
254 254 */
255 255  
256   -static int
257   -mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
  256 +static int mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
258 257 {
259 258 struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data;
260 259 struct map_pci_info *map = NULL;
... ... @@ -308,8 +307,7 @@
308 307 return err;
309 308 }
310 309  
311   -static void
312   -mtd_pci_remove(struct pci_dev *dev)
  310 +static void mtd_pci_remove(struct pci_dev *dev)
313 311 {
314 312 struct mtd_info *mtd = pci_get_drvdata(dev);
315 313 struct map_pci_info *map = mtd->priv;
drivers/mtd/maps/physmap_of.c
... ... @@ -78,7 +78,7 @@
78 78 * compatible binding, which has an extra "probe-type" property
79 79 * describing the type of flash probe necessary. */
80 80 static struct mtd_info *obsolete_probe(struct platform_device *dev,
81   - struct map_info *map)
  81 + struct map_info *map)
82 82 {
83 83 struct device_node *dp = dev->dev.of_node;
84 84 const char *of_probe;
drivers/mtd/maps/pismo.c
... ... @@ -66,8 +66,8 @@
66 66 return 1 << width;
67 67 }
68 68  
69   -static int pismo_eeprom_read(struct i2c_client *client, void *buf,
70   - u8 addr, size_t size)
  69 +static int pismo_eeprom_read(struct i2c_client *client, void *buf, u8 addr,
  70 + size_t size)
71 71 {
72 72 int ret;
73 73 struct i2c_msg msg[] = {
... ... @@ -89,7 +89,8 @@
89 89 }
90 90  
91 91 static int pismo_add_device(struct pismo_data *pismo, int i,
92   - struct pismo_mem *region, const char *name, void *pdata, size_t psize)
  92 + struct pismo_mem *region, const char *name,
  93 + void *pdata, size_t psize)
93 94 {
94 95 struct platform_device *dev;
95 96 struct resource res = { };
... ... @@ -130,7 +131,7 @@
130 131 }
131 132  
132 133 static int pismo_add_nor(struct pismo_data *pismo, int i,
133   - struct pismo_mem *region)
  134 + struct pismo_mem *region)
134 135 {
135 136 struct physmap_flash_data data = {
136 137 .width = region->width,
... ... @@ -144,7 +145,7 @@
144 145 }
145 146  
146 147 static int pismo_add_sram(struct pismo_data *pismo, int i,
147   - struct pismo_mem *region)
  148 + struct pismo_mem *region)
148 149 {
149 150 struct platdata_mtd_ram data = {
150 151 .bankwidth = region->width,
... ... @@ -155,7 +156,7 @@
155 156 }
156 157  
157 158 static void pismo_add_one(struct pismo_data *pismo, int i,
158   - const struct pismo_cs_block *cs, phys_addr_t base)
  159 + const struct pismo_cs_block *cs, phys_addr_t base)
159 160 {
160 161 struct device *dev = &pismo->client->dev;
161 162 struct pismo_mem region;
... ... @@ -211,7 +212,7 @@
211 212 }
212 213  
213 214 static int pismo_probe(struct i2c_client *client,
214   - const struct i2c_device_id *id)
  215 + const struct i2c_device_id *id)
215 216 {
216 217 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
217 218 struct pismo_pdata *pdata = client->dev.platform_data;
drivers/mtd/maps/scb2_flash.c
... ... @@ -69,8 +69,7 @@
69 69 };
70 70 static int region_fail;
71 71  
72   -static int
73   -scb2_fixup_mtd(struct mtd_info *mtd)
  72 +static int scb2_fixup_mtd(struct mtd_info *mtd)
74 73 {
75 74 int i;
76 75 int done = 0;
... ... @@ -133,8 +132,8 @@
133 132 /* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */
134 133 #define CSB5_FCR 0x41
135 134 #define CSB5_FCR_DECODE_ALL 0x0e
136   -static int
137   -scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent)
  135 +static int scb2_flash_probe(struct pci_dev *dev,
  136 + const struct pci_device_id *ent)
138 137 {
139 138 u8 reg;
140 139  
... ... @@ -197,8 +196,7 @@
197 196 return 0;
198 197 }
199 198  
200   -static void
201   -scb2_flash_remove(struct pci_dev *dev)
  199 +static void scb2_flash_remove(struct pci_dev *dev)
202 200 {
203 201 if (!scb2_mtd)
204 202 return;
drivers/mtd/nand/atmel_nand.c
... ... @@ -338,7 +338,7 @@
338 338 }
339 339  
340 340 static void pmecc_config_ecc_layout(struct nand_ecclayout *layout,
341   - int oobsize, int ecc_len)
  341 + int oobsize, int ecc_len)
342 342 {
343 343 int i;
344 344  
... ... @@ -1213,7 +1213,7 @@
1213 1213  
1214 1214 #if defined(CONFIG_OF)
1215 1215 static int atmel_of_init_port(struct atmel_nand_host *host,
1216   - struct device_node *np)
  1216 + struct device_node *np)
1217 1217 {
1218 1218 u32 val, table_offset;
1219 1219 u32 offset[2];
... ... @@ -1300,7 +1300,7 @@
1300 1300 }
1301 1301 #else
1302 1302 static int atmel_of_init_port(struct atmel_nand_host *host,
1303   - struct device_node *np)
  1303 + struct device_node *np)
1304 1304 {
1305 1305 return -EINVAL;
1306 1306 }
drivers/mtd/nand/bcm47xxnflash/main.c
... ... @@ -66,7 +66,7 @@
66 66 return err;
67 67 }
68 68  
69   -static int __devexit bcm47xxnflash_remove(struct platform_device *pdev)
  69 +static int bcm47xxnflash_remove(struct platform_device *pdev)
70 70 {
71 71 struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev);
72 72  
... ... @@ -77,7 +77,7 @@
77 77 }
78 78  
79 79 static struct platform_driver bcm47xxnflash_driver = {
80   - .remove = __devexit_p(bcm47xxnflash_remove),
  80 + .remove = bcm47xxnflash_remove,
81 81 .driver = {
82 82 .name = "bcma_nflash",
83 83 .owner = THIS_MODULE,
drivers/mtd/nand/fsl_upm.c
... ... @@ -153,8 +153,8 @@
153 153 }
154 154  
155 155 static int fun_chip_init(struct fsl_upm_nand *fun,
156   - const struct device_node *upm_np,
157   - const struct resource *io_res)
  156 + const struct device_node *upm_np,
  157 + const struct resource *io_res)
158 158 {
159 159 int ret;
160 160 struct device_node *flash_np;
drivers/mtd/nand/fsmc_nand.c
... ... @@ -865,7 +865,7 @@
865 865  
866 866 #ifdef CONFIG_OF
867 867 static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
868   - struct device_node *np)
  868 + struct device_node *np)
869 869 {
870 870 struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
871 871 u32 val;
... ... @@ -887,7 +887,7 @@
887 887 }
888 888 #else
889 889 static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
890   - struct device_node *np)
  890 + struct device_node *np)
891 891 {
892 892 return -ENOSYS;
893 893 }
drivers/mtd/nand/gpmi-nand/gpmi-nand.c
... ... @@ -319,8 +319,8 @@
319 319 return 0;
320 320 }
321 321  
322   -static int
323   -acquire_register_block(struct gpmi_nand_data *this, const char *res_name)
  322 +static int acquire_register_block(struct gpmi_nand_data *this,
  323 + const char *res_name)
324 324 {
325 325 struct platform_device *pdev = this->pdev;
326 326 struct resources *res = &this->resources;
... ... @@ -360,8 +360,7 @@
360 360 res->bch_regs = NULL;
361 361 }
362 362  
363   -static int
364   -acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
  363 +static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
365 364 {
366 365 struct platform_device *pdev = this->pdev;
367 366 struct resources *res = &this->resources;
drivers/mtd/nand/jz4740_nand.c
... ... @@ -326,7 +326,8 @@
326 326 static int jz_nand_detect_bank(struct platform_device *pdev,
327 327 struct jz_nand *nand, unsigned char bank,
328 328 size_t chipnr, uint8_t *nand_maf_id,
329   - uint8_t *nand_dev_id) {
  329 + uint8_t *nand_dev_id)
  330 +{
330 331 int ret;
331 332 int gpio;
332 333 char gpio_name[9];