Commit d8929942 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b859f159
...@@ -618,9 +618,8 @@ static char *otp_setup(struct mtd_info *device, char revision) ...@@ -618,9 +618,8 @@ static char *otp_setup(struct mtd_info *device, char revision)
/* /*
* Register DataFlash device with MTD subsystem. * Register DataFlash device with MTD subsystem.
*/ */
static int static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages,
add_dataflash_otp(struct spi_device *spi, char *name, int pagesize, int pageoffset, char revision)
int nr_pages, int pagesize, int pageoffset, char revision)
{ {
struct dataflash *priv; struct dataflash *priv;
struct mtd_info *device; struct mtd_info *device;
...@@ -679,9 +678,8 @@ add_dataflash_otp(struct spi_device *spi, char *name, ...@@ -679,9 +678,8 @@ add_dataflash_otp(struct spi_device *spi, char *name,
return err; return err;
} }
static inline int static inline int add_dataflash(struct spi_device *spi, char *name,
add_dataflash(struct spi_device *spi, char *name, int nr_pages, int pagesize, int pageoffset)
int nr_pages, int pagesize, int pageoffset)
{ {
return add_dataflash_otp(spi, name, nr_pages, pagesize, return add_dataflash_otp(spi, name, nr_pages, pagesize,
pageoffset, 0); pageoffset, 0);
......
...@@ -757,7 +757,7 @@ static int spear_smi_probe_flash(struct spear_smi *dev, u32 bank) ...@@ -757,7 +757,7 @@ static int spear_smi_probe_flash(struct spear_smi *dev, u32 bank)
#ifdef CONFIG_OF #ifdef CONFIG_OF
static int spear_smi_probe_config_dt(struct platform_device *pdev, static int spear_smi_probe_config_dt(struct platform_device *pdev,
struct device_node *np) struct device_node *np)
{ {
struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev); struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev);
struct device_node *pp = NULL; struct device_node *pp = NULL;
...@@ -800,7 +800,7 @@ static int spear_smi_probe_config_dt(struct platform_device *pdev, ...@@ -800,7 +800,7 @@ static int spear_smi_probe_config_dt(struct platform_device *pdev,
} }
#else #else
static int spear_smi_probe_config_dt(struct platform_device *pdev, static int spear_smi_probe_config_dt(struct platform_device *pdev,
struct device_node *np) struct device_node *np)
{ {
return -ENOSYS; return -ENOSYS;
} }
......
...@@ -145,7 +145,7 @@ static void esb2rom_cleanup(struct esb2rom_window *window) ...@@ -145,7 +145,7 @@ static void esb2rom_cleanup(struct esb2rom_window *window)
} }
static int esb2rom_init_one(struct pci_dev *pdev, static int esb2rom_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL }; static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
struct esb2rom_window *window = &esb2rom_window; struct esb2rom_window *window = &esb2rom_window;
......
...@@ -189,8 +189,7 @@ static void vr_nor_pci_remove(struct pci_dev *dev) ...@@ -189,8 +189,7 @@ static void vr_nor_pci_remove(struct pci_dev *dev)
pci_disable_device(dev); pci_disable_device(dev);
} }
static int static int vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
vr_nor_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
{ {
struct vr_nor_mtd *p = NULL; struct vr_nor_mtd *p = NULL;
unsigned int exp_timing_cs0; unsigned int exp_timing_cs0;
......
...@@ -253,8 +253,7 @@ static struct pci_device_id mtd_pci_ids[] = { ...@@ -253,8 +253,7 @@ static struct pci_device_id mtd_pci_ids[] = {
* Generic code follows. * Generic code follows.
*/ */
static int static int mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
{ {
struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data; struct mtd_pci_info *info = (struct mtd_pci_info *)id->driver_data;
struct map_pci_info *map = NULL; struct map_pci_info *map = NULL;
...@@ -308,8 +307,7 @@ mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -308,8 +307,7 @@ mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
return err; return err;
} }
static void static void mtd_pci_remove(struct pci_dev *dev)
mtd_pci_remove(struct pci_dev *dev)
{ {
struct mtd_info *mtd = pci_get_drvdata(dev); struct mtd_info *mtd = pci_get_drvdata(dev);
struct map_pci_info *map = mtd->priv; struct map_pci_info *map = mtd->priv;
......
...@@ -78,7 +78,7 @@ static int of_flash_remove(struct platform_device *dev) ...@@ -78,7 +78,7 @@ static int of_flash_remove(struct platform_device *dev)
* compatible binding, which has an extra "probe-type" property * compatible binding, which has an extra "probe-type" property
* describing the type of flash probe necessary. */ * describing the type of flash probe necessary. */
static struct mtd_info *obsolete_probe(struct platform_device *dev, static struct mtd_info *obsolete_probe(struct platform_device *dev,
struct map_info *map) struct map_info *map)
{ {
struct device_node *dp = dev->dev.of_node; struct device_node *dp = dev->dev.of_node;
const char *of_probe; const char *of_probe;
......
...@@ -66,8 +66,8 @@ static unsigned int pismo_width_to_bytes(unsigned int width) ...@@ -66,8 +66,8 @@ static unsigned int pismo_width_to_bytes(unsigned int width)
return 1 << width; return 1 << width;
} }
static int pismo_eeprom_read(struct i2c_client *client, void *buf, static int pismo_eeprom_read(struct i2c_client *client, void *buf, u8 addr,
u8 addr, size_t size) size_t size)
{ {
int ret; int ret;
struct i2c_msg msg[] = { struct i2c_msg msg[] = {
...@@ -89,7 +89,8 @@ static int pismo_eeprom_read(struct i2c_client *client, void *buf, ...@@ -89,7 +89,8 @@ static int pismo_eeprom_read(struct i2c_client *client, void *buf,
} }
static int pismo_add_device(struct pismo_data *pismo, int i, static int pismo_add_device(struct pismo_data *pismo, int i,
struct pismo_mem *region, const char *name, void *pdata, size_t psize) struct pismo_mem *region, const char *name,
void *pdata, size_t psize)
{ {
struct platform_device *dev; struct platform_device *dev;
struct resource res = { }; struct resource res = { };
...@@ -130,7 +131,7 @@ static int pismo_add_device(struct pismo_data *pismo, int i, ...@@ -130,7 +131,7 @@ static int pismo_add_device(struct pismo_data *pismo, int i,
} }
static int pismo_add_nor(struct pismo_data *pismo, int i, static int pismo_add_nor(struct pismo_data *pismo, int i,
struct pismo_mem *region) struct pismo_mem *region)
{ {
struct physmap_flash_data data = { struct physmap_flash_data data = {
.width = region->width, .width = region->width,
...@@ -144,7 +145,7 @@ static int pismo_add_nor(struct pismo_data *pismo, int i, ...@@ -144,7 +145,7 @@ static int pismo_add_nor(struct pismo_data *pismo, int i,
} }
static int pismo_add_sram(struct pismo_data *pismo, int i, static int pismo_add_sram(struct pismo_data *pismo, int i,
struct pismo_mem *region) struct pismo_mem *region)
{ {
struct platdata_mtd_ram data = { struct platdata_mtd_ram data = {
.bankwidth = region->width, .bankwidth = region->width,
...@@ -155,7 +156,7 @@ static int pismo_add_sram(struct pismo_data *pismo, int i, ...@@ -155,7 +156,7 @@ static int pismo_add_sram(struct pismo_data *pismo, int i,
} }
static void pismo_add_one(struct pismo_data *pismo, int i, static void pismo_add_one(struct pismo_data *pismo, int i,
const struct pismo_cs_block *cs, phys_addr_t base) const struct pismo_cs_block *cs, phys_addr_t base)
{ {
struct device *dev = &pismo->client->dev; struct device *dev = &pismo->client->dev;
struct pismo_mem region; struct pismo_mem region;
...@@ -211,7 +212,7 @@ static int pismo_remove(struct i2c_client *client) ...@@ -211,7 +212,7 @@ static int pismo_remove(struct i2c_client *client)
} }
static int pismo_probe(struct i2c_client *client, static int pismo_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
struct pismo_pdata *pdata = client->dev.platform_data; struct pismo_pdata *pdata = client->dev.platform_data;
......
...@@ -69,8 +69,7 @@ static struct map_info scb2_map = { ...@@ -69,8 +69,7 @@ static struct map_info scb2_map = {
}; };
static int region_fail; static int region_fail;
static int static int scb2_fixup_mtd(struct mtd_info *mtd)
scb2_fixup_mtd(struct mtd_info *mtd)
{ {
int i; int i;
int done = 0; int done = 0;
...@@ -133,8 +132,8 @@ scb2_fixup_mtd(struct mtd_info *mtd) ...@@ -133,8 +132,8 @@ scb2_fixup_mtd(struct mtd_info *mtd)
/* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */ /* CSB5's 'Function Control Register' has bits for decoding @ >= 0xffc00000 */
#define CSB5_FCR 0x41 #define CSB5_FCR 0x41
#define CSB5_FCR_DECODE_ALL 0x0e #define CSB5_FCR_DECODE_ALL 0x0e
static int static int scb2_flash_probe(struct pci_dev *dev,
scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
u8 reg; u8 reg;
...@@ -197,8 +196,7 @@ scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent) ...@@ -197,8 +196,7 @@ scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent)
return 0; return 0;
} }
static void static void scb2_flash_remove(struct pci_dev *dev)
scb2_flash_remove(struct pci_dev *dev)
{ {
if (!scb2_mtd) if (!scb2_mtd)
return; return;
......
...@@ -338,7 +338,7 @@ static int pmecc_get_ecc_bytes(int cap, int sector_size) ...@@ -338,7 +338,7 @@ static int pmecc_get_ecc_bytes(int cap, int sector_size)
} }
static void pmecc_config_ecc_layout(struct nand_ecclayout *layout, static void pmecc_config_ecc_layout(struct nand_ecclayout *layout,
int oobsize, int ecc_len) int oobsize, int ecc_len)
{ {
int i; int i;
...@@ -1213,7 +1213,7 @@ static void atmel_nand_hwctl(struct mtd_info *mtd, int mode) ...@@ -1213,7 +1213,7 @@ static void atmel_nand_hwctl(struct mtd_info *mtd, int mode)
#if defined(CONFIG_OF) #if defined(CONFIG_OF)
static int atmel_of_init_port(struct atmel_nand_host *host, static int atmel_of_init_port(struct atmel_nand_host *host,
struct device_node *np) struct device_node *np)
{ {
u32 val, table_offset; u32 val, table_offset;
u32 offset[2]; u32 offset[2];
...@@ -1300,7 +1300,7 @@ static int atmel_of_init_port(struct atmel_nand_host *host, ...@@ -1300,7 +1300,7 @@ static int atmel_of_init_port(struct atmel_nand_host *host,
} }
#else #else
static int atmel_of_init_port(struct atmel_nand_host *host, static int atmel_of_init_port(struct atmel_nand_host *host,
struct device_node *np) struct device_node *np)
{ {
return -EINVAL; return -EINVAL;
} }
......
...@@ -66,7 +66,7 @@ static int bcm47xxnflash_probe(struct platform_device *pdev) ...@@ -66,7 +66,7 @@ static int bcm47xxnflash_probe(struct platform_device *pdev)
return err; return err;
} }
static int __devexit bcm47xxnflash_remove(struct platform_device *pdev) static int bcm47xxnflash_remove(struct platform_device *pdev)
{ {
struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev); struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev);
...@@ -77,7 +77,7 @@ static int __devexit bcm47xxnflash_remove(struct platform_device *pdev) ...@@ -77,7 +77,7 @@ static int __devexit bcm47xxnflash_remove(struct platform_device *pdev)
} }
static struct platform_driver bcm47xxnflash_driver = { static struct platform_driver bcm47xxnflash_driver = {
.remove = __devexit_p(bcm47xxnflash_remove), .remove = bcm47xxnflash_remove,
.driver = { .driver = {
.name = "bcma_nflash", .name = "bcma_nflash",
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -153,8 +153,8 @@ static void fun_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) ...@@ -153,8 +153,8 @@ static void fun_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
} }
static int fun_chip_init(struct fsl_upm_nand *fun, static int fun_chip_init(struct fsl_upm_nand *fun,
const struct device_node *upm_np, const struct device_node *upm_np,
const struct resource *io_res) const struct resource *io_res)
{ {
int ret; int ret;
struct device_node *flash_np; struct device_node *flash_np;
......
...@@ -865,7 +865,7 @@ static bool filter(struct dma_chan *chan, void *slave) ...@@ -865,7 +865,7 @@ static bool filter(struct dma_chan *chan, void *slave)
#ifdef CONFIG_OF #ifdef CONFIG_OF
static int fsmc_nand_probe_config_dt(struct platform_device *pdev, static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
struct device_node *np) struct device_node *np)
{ {
struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev); struct fsmc_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
u32 val; u32 val;
...@@ -887,7 +887,7 @@ static int fsmc_nand_probe_config_dt(struct platform_device *pdev, ...@@ -887,7 +887,7 @@ static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
} }
#else #else
static int fsmc_nand_probe_config_dt(struct platform_device *pdev, static int fsmc_nand_probe_config_dt(struct platform_device *pdev,
struct device_node *np) struct device_node *np)
{ {
return -ENOSYS; return -ENOSYS;
} }
......
...@@ -319,8 +319,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this, ...@@ -319,8 +319,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
return 0; return 0;
} }
static int static int acquire_register_block(struct gpmi_nand_data *this,
acquire_register_block(struct gpmi_nand_data *this, const char *res_name) const char *res_name)
{ {
struct platform_device *pdev = this->pdev; struct platform_device *pdev = this->pdev;
struct resources *res = &this->resources; struct resources *res = &this->resources;
...@@ -360,8 +360,7 @@ static void release_register_block(struct gpmi_nand_data *this) ...@@ -360,8 +360,7 @@ static void release_register_block(struct gpmi_nand_data *this)
res->bch_regs = NULL; res->bch_regs = NULL;
} }
static int static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h)
{ {
struct platform_device *pdev = this->pdev; struct platform_device *pdev = this->pdev;
struct resources *res = &this->resources; struct resources *res = &this->resources;
......
...@@ -326,7 +326,8 @@ static inline void jz_nand_iounmap_resource(struct resource *res, ...@@ -326,7 +326,8 @@ static inline void jz_nand_iounmap_resource(struct resource *res,
static int jz_nand_detect_bank(struct platform_device *pdev, static int jz_nand_detect_bank(struct platform_device *pdev,
struct jz_nand *nand, unsigned char bank, struct jz_nand *nand, unsigned char bank,
size_t chipnr, uint8_t *nand_maf_id, size_t chipnr, uint8_t *nand_maf_id,
uint8_t *nand_dev_id) { uint8_t *nand_dev_id)
{
int ret; int ret;
int gpio; int gpio;
char gpio_name[9]; char gpio_name[9];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment