Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+37 -43
+4 -6
drivers/mtd/devices/mtd_dataflash.c
··· 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; ··· 678 679 return err; 679 680 } 680 681 681 - static inline int 682 - add_dataflash(struct spi_device *spi, char *name, 683 - int nr_pages, int pagesize, int pageoffset) 682 + static inline int add_dataflash(struct spi_device *spi, char *name, 683 + int nr_pages, int pagesize, int pageoffset) 684 684 { 685 685 return add_dataflash_otp(spi, name, nr_pages, pagesize, 686 686 pageoffset, 0);
+2 -2
drivers/mtd/devices/spear_smi.c
··· 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 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 }
+1 -1
drivers/mtd/maps/esb2rom.c
··· 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;
+1 -2
drivers/mtd/maps/intel_vr_nor.c
··· 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;
+2 -4
drivers/mtd/maps/pci.c
··· 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; ··· 307 308 return err; 308 309 } 309 310 310 - static void 311 - mtd_pci_remove(struct pci_dev *dev) 311 + static void mtd_pci_remove(struct pci_dev *dev) 312 312 { 313 313 struct mtd_info *mtd = pci_get_drvdata(dev); 314 314 struct map_pci_info *map = mtd->priv;
+1 -1
drivers/mtd/maps/physmap_of.c
··· 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;
+8 -7
drivers/mtd/maps/pismo.c
··· 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 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 = { }; ··· 131 130 } 132 131 133 132 static int pismo_add_nor(struct pismo_data *pismo, int i, 134 - struct pismo_mem *region) 133 + struct pismo_mem *region) 135 134 { 136 135 struct physmap_flash_data data = { 137 136 .width = region->width, ··· 145 144 } 146 145 147 146 static int pismo_add_sram(struct pismo_data *pismo, int i, 148 - struct pismo_mem *region) 147 + struct pismo_mem *region) 149 148 { 150 149 struct platdata_mtd_ram data = { 151 150 .bankwidth = region->width, ··· 156 155 } 157 156 158 157 static void pismo_add_one(struct pismo_data *pismo, int i, 159 - const struct pismo_cs_block *cs, phys_addr_t base) 158 + const struct pismo_cs_block *cs, phys_addr_t base) 160 159 { 161 160 struct device *dev = &pismo->client->dev; 162 161 struct pismo_mem region; ··· 212 211 } 213 212 214 213 static int pismo_probe(struct i2c_client *client, 215 - const struct i2c_device_id *id) 214 + const struct i2c_device_id *id) 216 215 { 217 216 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 218 217 struct pismo_pdata *pdata = client->dev.platform_data;
+4 -6
drivers/mtd/maps/scb2_flash.c
··· 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; ··· 132 133 /* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */ 133 134 #define CSB5_FCR 0x41 134 135 #define CSB5_FCR_DECODE_ALL 0x0e 135 - static int 136 - scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent) 136 + static int scb2_flash_probe(struct pci_dev *dev, 137 + const struct pci_device_id *ent) 137 138 { 138 139 u8 reg; 139 140 ··· 196 197 return 0; 197 198 } 198 199 199 - static void 200 - scb2_flash_remove(struct pci_dev *dev) 200 + static void scb2_flash_remove(struct pci_dev *dev) 201 201 { 202 202 if (!scb2_mtd) 203 203 return;
+3 -3
drivers/mtd/nand/atmel_nand.c
··· 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 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 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 }
+2 -2
drivers/mtd/nand/bcm47xxnflash/main.c
··· 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 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,
+2 -2
drivers/mtd/nand/fsl_upm.c
··· 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;
+2 -2
drivers/mtd/nand/fsmc_nand.c
··· 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 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 }
+3 -4
drivers/mtd/nand/gpmi-nand/gpmi-nand.c
··· 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 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;
+2 -1
drivers/mtd/nand/jz4740_nand.c
··· 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];