aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-12-21 16:19:05 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-03 18:57:03 -0500
commitd8929942806270801023c90d78885e5347be718f (patch)
treec1bea69a0436855c6e149ec43d1f90d531345609
parentb859f15921321b7bf4cb4cf188e31a6a25d2dff3 (diff)
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>
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c10
-rw-r--r--drivers/mtd/devices/spear_smi.c4
-rw-r--r--drivers/mtd/maps/esb2rom.c2
-rw-r--r--drivers/mtd/maps/intel_vr_nor.c3
-rw-r--r--drivers/mtd/maps/pci.c6
-rw-r--r--drivers/mtd/maps/physmap_of.c2
-rw-r--r--drivers/mtd/maps/pismo.c15
-rw-r--r--drivers/mtd/maps/scb2_flash.c10
-rw-r--r--drivers/mtd/nand/atmel_nand.c6
-rw-r--r--drivers/mtd/nand/bcm47xxnflash/main.c4
-rw-r--r--drivers/mtd/nand/fsl_upm.c4
-rw-r--r--drivers/mtd/nand/fsmc_nand.c4
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-nand.c7
-rw-r--r--drivers/mtd/nand/jz4740_nand.c3
14 files changed, 37 insertions, 43 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index ea7ea7b595d8..945c9f762349 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -618,9 +618,8 @@ static char *otp_setup(struct mtd_info *device, char revision)
618/* 618/*
619 * Register DataFlash device with MTD subsystem. 619 * Register DataFlash device with MTD subsystem.
620 */ 620 */
621static int 621static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages,
622add_dataflash_otp(struct spi_device *spi, char *name, 622 int pagesize, int pageoffset, char revision)
623 int nr_pages, int pagesize, int pageoffset, char revision)
624{ 623{
625 struct dataflash *priv; 624 struct dataflash *priv;
626 struct mtd_info *device; 625 struct mtd_info *device;
@@ -679,9 +678,8 @@ add_dataflash_otp(struct spi_device *spi, char *name,
679 return err; 678 return err;
680} 679}
681 680
682static inline int 681static inline int add_dataflash(struct spi_device *spi, char *name,
683add_dataflash(struct spi_device *spi, char *name, 682 int nr_pages, int pagesize, int pageoffset)
684 int nr_pages, int pagesize, int pageoffset)
685{ 683{
686 return add_dataflash_otp(spi, name, nr_pages, pagesize, 684 return add_dataflash_otp(spi, name, nr_pages, pagesize,
687 pageoffset, 0); 685 pageoffset, 0);
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 2d2c2a5d4d2a..2aabd96bf0ff 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -757,7 +757,7 @@ err_probe:
757 757
758#ifdef CONFIG_OF 758#ifdef CONFIG_OF
759static int spear_smi_probe_config_dt(struct platform_device *pdev, 759static int spear_smi_probe_config_dt(struct platform_device *pdev,
760 struct device_node *np) 760 struct device_node *np)
761{ 761{
762 struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev); 762 struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev);
763 struct device_node *pp = NULL; 763 struct device_node *pp = NULL;
@@ -800,7 +800,7 @@ static int spear_smi_probe_config_dt(struct platform_device *pdev,
800} 800}
801#else 801#else
802static int spear_smi_probe_config_dt(struct platform_device *pdev, 802static int spear_smi_probe_config_dt(struct platform_device *pdev,
803 struct device_node *np) 803 struct device_node *np)
804{ 804{
805 return -ENOSYS; 805 return -ENOSYS;
806} 806}
diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c
index ff8681a25831..f784cf0caa13 100644
--- a/drivers/mtd/maps/esb2rom.c
+++ b/drivers/mtd/maps/esb2rom.c
@@ -145,7 +145,7 @@ static void esb2rom_cleanup(struct esb2rom_window *window)
145} 145}
146 146
147static int esb2rom_init_one(struct pci_dev *pdev, 147static 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 static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL }; 150 static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
151 struct esb2rom_window *window = &esb2rom_window; 151 struct esb2rom_window *window = &esb2rom_window;
diff --git a/drivers/mtd/maps/intel_vr_nor.c b/drivers/mtd/maps/intel_vr_nor.c
index 3ee2ad1dcbe7..b14053b25026 100644
--- a/drivers/mtd/maps/intel_vr_nor.c
+++ b/drivers/mtd/maps/intel_vr_nor.c
@@ -189,8 +189,7 @@ static void vr_nor_pci_remove(struct pci_dev *dev)
189 pci_disable_device(dev); 189 pci_disable_device(dev);
190} 190}
191 191
192static int 192static int vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
193vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
194{ 193{
195 struct vr_nor_mtd *p = NULL; 194 struct vr_nor_mtd *p = NULL;
196 unsigned int exp_timing_cs0; 195 unsigned int exp_timing_cs0;
diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c
index ed82914966f5..c3aebd5da5d6 100644
--- a/drivers/mtd/maps/pci.c
+++ b/drivers/mtd/maps/pci.c
@@ -253,8 +253,7 @@ static struct pci_device_id mtd_pci_ids[] = {
253 * Generic code follows. 253 * Generic code follows.
254 */ 254 */
255 255
256static int 256static int mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
257mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
258{ 257{
259 struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data; 258 struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data;
260 struct map_pci_info *map = NULL; 259 struct map_pci_info *map = NULL;
@@ -308,8 +307,7 @@ out:
308 return err; 307 return err;
309} 308}
310 309
311static void 310static void mtd_pci_remove(struct pci_dev *dev)
312mtd_pci_remove(struct pci_dev *dev)
313{ 311{
314 struct mtd_info *mtd = pci_get_drvdata(dev); 312 struct mtd_info *mtd = pci_get_drvdata(dev);
315 struct map_pci_info *map = mtd->priv; 313 struct map_pci_info *map = mtd->priv;
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 37cdc201652f..67cc73c18ddd 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -78,7 +78,7 @@ static int of_flash_remove(struct platform_device *dev)
78 * compatible binding, which has an extra "probe-type" property 78 * compatible binding, which has an extra "probe-type" property
79 * describing the type of flash probe necessary. */ 79 * describing the type of flash probe necessary. */
80static struct mtd_info *obsolete_probe(struct platform_device *dev, 80static struct mtd_info *obsolete_probe(struct platform_device *dev,
81 struct map_info *map) 81 struct map_info *map)
82{ 82{
83 struct device_node *dp = dev->dev.of_node; 83 struct device_node *dp = dev->dev.of_node;
84 const char *of_probe; 84 const char *of_probe;
diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c
index afea93b515d5..dc6df9abea0b 100644
--- a/drivers/mtd/maps/pismo.c
+++ b/drivers/mtd/maps/pismo.c
@@ -66,8 +66,8 @@ static unsigned int pismo_width_to_bytes(unsigned int width)
66 return 1 << width; 66 return 1 << width;
67} 67}
68 68
69static int pismo_eeprom_read(struct i2c_client *client, void *buf, 69static int pismo_eeprom_read(struct i2c_client *client, void *buf, u8 addr,
70 u8 addr, size_t size) 70 size_t size)
71{ 71{
72 int ret; 72 int ret;
73 struct i2c_msg msg[] = { 73 struct i2c_msg msg[] = {
@@ -89,7 +89,8 @@ static int pismo_eeprom_read(struct i2c_client *client, void *buf,
89} 89}
90 90
91static int pismo_add_device(struct pismo_data *pismo, int i, 91static 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 struct platform_device *dev; 95 struct platform_device *dev;
95 struct resource res = { }; 96 struct resource res = { };
@@ -130,7 +131,7 @@ static int pismo_add_device(struct pismo_data *pismo, int i,
130} 131}
131 132
132static int pismo_add_nor(struct pismo_data *pismo, int i, 133static int pismo_add_nor(struct pismo_data *pismo, int i,
133 struct pismo_mem *region) 134 struct pismo_mem *region)
134{ 135{
135 struct physmap_flash_data data = { 136 struct physmap_flash_data data = {
136 .width = region->width, 137 .width = region->width,
@@ -144,7 +145,7 @@ static int pismo_add_nor(struct pismo_data *pismo, int i,
144} 145}
145 146
146static int pismo_add_sram(struct pismo_data *pismo, int i, 147static int pismo_add_sram(struct pismo_data *pismo, int i,
147 struct pismo_mem *region) 148 struct pismo_mem *region)
148{ 149{
149 struct platdata_mtd_ram data = { 150 struct platdata_mtd_ram data = {
150 .bankwidth = region->width, 151 .bankwidth = region->width,
@@ -155,7 +156,7 @@ static int pismo_add_sram(struct pismo_data *pismo, int i,
155} 156}
156 157
157static void pismo_add_one(struct pismo_data *pismo, int i, 158static 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 struct device *dev = &pismo->client->dev; 161 struct device *dev = &pismo->client->dev;
161 struct pismo_mem region; 162 struct pismo_mem region;
@@ -211,7 +212,7 @@ static int pismo_remove(struct i2c_client *client)
211} 212}
212 213
213static int pismo_probe(struct i2c_client *client, 214static int pismo_probe(struct i2c_client *client,
214 const struct i2c_device_id *id) 215 const struct i2c_device_id *id)
215{ 216{
216 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 217 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
217 struct pismo_pdata *pdata = client->dev.platform_data; 218 struct pismo_pdata *pdata = client->dev.platform_data;
diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c
index 71796137e97b..c77b68c9412f 100644
--- a/drivers/mtd/maps/scb2_flash.c
+++ b/drivers/mtd/maps/scb2_flash.c
@@ -69,8 +69,7 @@ static struct map_info scb2_map = {
69}; 69};
70static int region_fail; 70static int region_fail;
71 71
72static int 72static int scb2_fixup_mtd(struct mtd_info *mtd)
73scb2_fixup_mtd(struct mtd_info *mtd)
74{ 73{
75 int i; 74 int i;
76 int done = 0; 75 int done = 0;
@@ -133,8 +132,8 @@ scb2_fixup_mtd(struct mtd_info *mtd)
133/* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */ 132/* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */
134#define CSB5_FCR 0x41 133#define CSB5_FCR 0x41
135#define CSB5_FCR_DECODE_ALL 0x0e 134#define CSB5_FCR_DECODE_ALL 0x0e
136static int 135static int scb2_flash_probe(struct pci_dev *dev,
137scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent) 136 const struct pci_device_id *ent)
138{ 137{
139 u8 reg; 138 u8 reg;
140 139
@@ -197,8 +196,7 @@ scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent)
197 return 0; 196 return 0;
198} 197}
199 198
200static void 199static void scb2_flash_remove(struct pci_dev *dev)
201scb2_flash_remove(struct pci_dev *dev)
202{ 200{
203 if (!scb2_mtd) 201 if (!scb2_mtd)
204 return; 202 return;
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 90bdca61c797..c516a9408087 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -338,7 +338,7 @@ static int pmecc_get_ecc_bytes(int cap, int sector_size)
338} 338}
339 339
340static void pmecc_config_ecc_layout(struct nand_ecclayout *layout, 340static void pmecc_config_ecc_layout(struct nand_ecclayout *layout,
341 int oobsize, int ecc_len) 341 int oobsize, int ecc_len)
342{ 342{
343 int i; 343 int i;
344 344
@@ -1213,7 +1213,7 @@ static void atmel_nand_hwctl(struct mtd_info *mtd, int mode)
1213 1213
1214#if defined(CONFIG_OF) 1214#if defined(CONFIG_OF)
1215static int atmel_of_init_port(struct atmel_nand_host *host, 1215static int atmel_of_init_port(struct atmel_nand_host *host,
1216 struct device_node *np) 1216 struct device_node *np)
1217{ 1217{
1218 u32 val, table_offset; 1218 u32 val, table_offset;
1219 u32 offset[2]; 1219 u32 offset[2];
@@ -1300,7 +1300,7 @@ static int atmel_of_init_port(struct atmel_nand_host *host,
1300} 1300}
1301#else 1301#else
1302static int atmel_of_init_port(struct atmel_nand_host *host, 1302static int atmel_of_init_port(struct atmel_nand_host *host,
1303 struct device_node *np) 1303 struct device_node *np)
1304{ 1304{
1305 return -EINVAL; 1305 return -EINVAL;
1306} 1306}
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c
index 2b8b05bec3dd..8363a9a5fa3f 100644
--- a/drivers/mtd/nand/bcm47xxnflash/main.c
+++ b/drivers/mtd/nand/bcm47xxnflash/main.c
@@ -66,7 +66,7 @@ out:
66 return err; 66 return err;
67} 67}
68 68
69static int __devexit bcm47xxnflash_remove(struct platform_device *pdev) 69static int bcm47xxnflash_remove(struct platform_device *pdev)
70{ 70{
71 struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev); 71 struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev);
72 72
@@ -77,7 +77,7 @@ static int __devexit bcm47xxnflash_remove(struct platform_device *pdev)
77} 77}
78 78
79static struct platform_driver bcm47xxnflash_driver = { 79static struct platform_driver bcm47xxnflash_driver = {
80 .remove = __devexit_p(bcm47xxnflash_remove), 80 .remove = bcm47xxnflash_remove,
81 .driver = { 81 .driver = {
82 .name = "bcma_nflash", 82 .name = "bcma_nflash",
83 .owner = THIS_MODULE, 83 .owner = THIS_MODULE,
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 5a8f5c4ce512..04e07252d74b 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -153,8 +153,8 @@ static void fun_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
153} 153}
154 154
155static int fun_chip_init(struct fsl_upm_nand *fun, 155static int fun_chip_init(struct fsl_upm_nand *fun,
156 const struct device_node *upm_np, 156 const struct device_node *upm_np,
157 const struct resource *io_res) 157 const struct resource *io_res)
158{ 158{
159 int ret; 159 int ret;
160 struct device_node *flash_np; 160 struct device_node *flash_np;
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 1d7446434b0e..67e62d3d495c 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -865,7 +865,7 @@ static bool filter(struct dma_chan *chan, void *slave)
865 865
866#ifdef CONFIG_OF 866#ifdef CONFIG_OF
867static int fsmc_nand_probe_config_dt(struct platform_device *pdev, 867static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
868 struct device_node *np) 868 struct device_node *np)
869{ 869{
870 struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev); 870 struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
871 u32 val; 871 u32 val;
@@ -887,7 +887,7 @@ static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
887} 887}
888#else 888#else
889static int fsmc_nand_probe_config_dt(struct platform_device *pdev, 889static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
890 struct device_node *np) 890 struct device_node *np)
891{ 891{
892 return -ENOSYS; 892 return -ENOSYS;
893} 893}
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 5cd141f7bfc2..e9b1c47e3cf9 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -319,8 +319,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
319 return 0; 319 return 0;
320} 320}
321 321
322static int 322static int acquire_register_block(struct gpmi_nand_data *this,
323acquire_register_block(struct gpmi_nand_data *this, const char *res_name) 323 const char *res_name)
324{ 324{
325 struct platform_device *pdev = this->pdev; 325 struct platform_device *pdev = this->pdev;
326 struct resources *res = &this->resources; 326 struct resources *res = &this->resources;
@@ -360,8 +360,7 @@ static void release_register_block(struct gpmi_nand_data *this)
360 res->bch_regs = NULL; 360 res->bch_regs = NULL;
361} 361}
362 362
363static int 363static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
364acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
365{ 364{
366 struct platform_device *pdev = this->pdev; 365 struct platform_device *pdev = this->pdev;
367 struct resources *res = &this->resources; 366 struct resources *res = &this->resources;
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
index 8d415f014e1d..b76460eeaf22 100644
--- a/drivers/mtd/nand/jz4740_nand.c
+++ b/drivers/mtd/nand/jz4740_nand.c
@@ -326,7 +326,8 @@ static inline void jz_nand_iounmap_resource(struct resource *res,
326static int jz_nand_detect_bank(struct platform_device *pdev, 326static int jz_nand_detect_bank(struct platform_device *pdev,
327 struct jz_nand *nand, unsigned char bank, 327 struct jz_nand *nand, unsigned char bank,
328 size_t chipnr, uint8_t *nand_maf_id, 328 size_t chipnr, uint8_t *nand_maf_id,
329 uint8_t *nand_dev_id) { 329 uint8_t *nand_dev_id)
330{
330 int ret; 331 int ret;
331 int gpio; 332 int gpio;
332 char gpio_name[9]; 333 char gpio_name[9];