Drivers: char: 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, __devinitdata,
__devinitconst, 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 Airlie <airlied@linux.ie>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2012-12-21 15:12:08 -08:00
parent 1850514b3e
commit bcd2982a0e
26 changed files with 49 additions and 58 deletions

View File

@ -299,8 +299,7 @@ static struct agp_device_ids ali_agp_device_ids[] =
{ }, /* dummy final entry, always present */ { }, /* dummy final entry, always present */
}; };
static int __devinit agp_ali_probe(struct pci_dev *pdev, static int agp_ali_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
const struct pci_device_id *ent)
{ {
struct agp_device_ids *devs = ali_agp_device_ids; struct agp_device_ids *devs = ali_agp_device_ids;
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;

View File

@ -405,7 +405,7 @@ static struct agp_device_ids amd_agp_device_ids[] =
{ }, /* dummy final entry, always present */ { }, /* dummy final entry, always present */
}; };
static int __devinit agp_amdk7_probe(struct pci_dev *pdev, static int agp_amdk7_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;

View File

@ -240,7 +240,7 @@ static const struct agp_bridge_driver amd_8151_driver = {
}; };
/* Some basic sanity checks for the aperture. */ /* Some basic sanity checks for the aperture. */
static int __devinit agp_aperture_valid(u64 aper, u32 size) static int agp_aperture_valid(u64 aper, u32 size)
{ {
if (!aperture_valid(aper, size, 32*1024*1024)) if (!aperture_valid(aper, size, 32*1024*1024))
return 0; return 0;
@ -267,8 +267,7 @@ static int __devinit agp_aperture_valid(u64 aper, u32 size)
* to allocate that much memory. But at least error out cleanly instead of * to allocate that much memory. But at least error out cleanly instead of
* crashing. * crashing.
*/ */
static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, static int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, u16 cap)
u16 cap)
{ {
u32 aper_low, aper_hi; u32 aper_low, aper_hi;
u64 aper, nb_aper; u64 aper, nb_aper;
@ -326,7 +325,7 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
return 0; return 0;
} }
static __devinit int cache_nbs(struct pci_dev *pdev, u32 cap_ptr) static int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
{ {
int i; int i;
@ -352,7 +351,7 @@ static __devinit int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
} }
/* Handle AMD 8151 quirks */ /* Handle AMD 8151 quirks */
static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge) static void amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge)
{ {
char *revstring; char *revstring;
@ -390,7 +389,7 @@ static const struct aper_size_info_32 uli_sizes[7] =
{8, 2048, 1, 4}, {8, 2048, 1, 4},
{4, 1024, 0, 3} {4, 1024, 0, 3}
}; };
static int __devinit uli_agp_init(struct pci_dev *pdev) static int uli_agp_init(struct pci_dev *pdev)
{ {
u32 httfea,baseaddr,enuscr; u32 httfea,baseaddr,enuscr;
struct pci_dev *dev1; struct pci_dev *dev1;
@ -513,7 +512,7 @@ put:
return ret; return ret;
} }
static int __devinit agp_amd64_probe(struct pci_dev *pdev, static int agp_amd64_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;

View File

@ -490,8 +490,7 @@ static struct agp_device_ids ati_agp_device_ids[] =
{ }, /* dummy final entry, always present */ { }, /* dummy final entry, always present */
}; };
static int __devinit agp_ati_probe(struct pci_dev *pdev, static int agp_ati_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
const struct pci_device_id *ent)
{ {
struct agp_device_ids *devs = ati_agp_device_ids; struct agp_device_ids *devs = ati_agp_device_ids;
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;

View File

@ -343,7 +343,7 @@ static const struct agp_bridge_driver efficeon_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static int __devinit agp_efficeon_probe(struct pci_dev *pdev, static int agp_efficeon_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;

View File

@ -587,7 +587,7 @@ const struct agp_bridge_driver intel_i460_driver = {
.cant_use_aperture = true, .cant_use_aperture = true,
}; };
static int __devinit agp_intel_i460_probe(struct pci_dev *pdev, static int agp_intel_i460_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;
@ -637,7 +637,7 @@ static struct pci_driver agp_intel_i460_pci_driver = {
.name = "agpgart-intel-i460", .name = "agpgart-intel-i460",
.id_table = agp_intel_i460_pci_table, .id_table = agp_intel_i460_pci_table,
.probe = agp_intel_i460_probe, .probe = agp_intel_i460_probe,
.remove = __devexit_p(agp_intel_i460_remove), .remove = agp_intel_i460_remove,
}; };
static int __init agp_intel_i460_init(void) static int __init agp_intel_i460_init(void)

View File

@ -732,7 +732,7 @@ static const struct intel_agp_driver_description {
{ 0, NULL, NULL } { 0, NULL, NULL }
}; };
static int __devinit agp_intel_probe(struct pci_dev *pdev, static int agp_intel_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;
@ -912,7 +912,7 @@ static struct pci_driver agp_intel_pci_driver = {
.name = "agpgart-intel", .name = "agpgart-intel",
.id_table = agp_intel_pci_table, .id_table = agp_intel_pci_table,
.probe = agp_intel_probe, .probe = agp_intel_probe,
.remove = __devexit_p(agp_intel_remove), .remove = agp_intel_remove,
#ifdef CONFIG_PM #ifdef CONFIG_PM
.resume = agp_intel_resume, .resume = agp_intel_resume,
#endif #endif

View File

@ -332,7 +332,7 @@ static const struct agp_bridge_driver nvidia_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static int __devinit agp_nvidia_probe(struct pci_dev *pdev, static int agp_nvidia_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;

View File

@ -270,7 +270,7 @@ const struct agp_bridge_driver sgi_tioca_driver = {
.num_aperture_sizes = 1, .num_aperture_sizes = 1,
}; };
static int __devinit agp_sgi_init(void) static int agp_sgi_init(void)
{ {
unsigned int j; unsigned int j;
struct tioca_kernel *info; struct tioca_kernel *info;

View File

@ -154,7 +154,7 @@ static int sis_broken_chipsets[] = {
0 // terminator 0 // terminator
}; };
static void __devinit sis_get_driver(struct agp_bridge_data *bridge) static void sis_get_driver(struct agp_bridge_data *bridge)
{ {
int i; int i;
@ -180,8 +180,7 @@ static void __devinit sis_get_driver(struct agp_bridge_data *bridge)
} }
static int __devinit agp_sis_probe(struct pci_dev *pdev, static int agp_sis_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
const struct pci_device_id *ent)
{ {
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;
u8 cap_ptr; u8 cap_ptr;

View File

@ -445,7 +445,7 @@ static const struct agp_bridge_driver sworks_driver = {
.agp_type_to_mask_type = agp_generic_type_to_mask_type, .agp_type_to_mask_type = agp_generic_type_to_mask_type,
}; };
static int __devinit agp_serverworks_probe(struct pci_dev *pdev, static int agp_serverworks_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;

View File

@ -592,7 +592,7 @@ static struct agp_device_ids uninorth_agp_device_ids[] = {
}, },
}; };
static int __devinit agp_uninorth_probe(struct pci_dev *pdev, static int agp_uninorth_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_device_ids *devs = uninorth_agp_device_ids; struct agp_device_ids *devs = uninorth_agp_device_ids;

View File

@ -438,8 +438,7 @@ static void check_via_agp3 (struct agp_bridge_data *bridge)
} }
static int __devinit agp_via_probe(struct pci_dev *pdev, static int agp_via_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
const struct pci_device_id *ent)
{ {
struct agp_device_ids *devs = via_agp_device_ids; struct agp_device_ids *devs = via_agp_device_ids;
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;

View File

@ -138,7 +138,7 @@ static const struct dev_pm_ops atmel_trng_pm_ops = {
static struct platform_driver atmel_trng_driver = { static struct platform_driver atmel_trng_driver = {
.probe = atmel_trng_probe, .probe = atmel_trng_probe,
.remove = __devexit_p(atmel_trng_remove), .remove = atmel_trng_remove,
.driver = { .driver = {
.name = "atmel-trng", .name = "atmel-trng",
.owner = THIS_MODULE, .owner = THIS_MODULE,

View File

@ -61,7 +61,7 @@ static int bcm63xx_rng_data_read(struct hwrng *rng, u32 *data)
return 4; return 4;
} }
static int __devinit bcm63xx_rng_probe(struct platform_device *pdev) static int bcm63xx_rng_probe(struct platform_device *pdev)
{ {
struct resource *r; struct resource *r;
struct clk *clk; struct clk *clk;
@ -161,7 +161,7 @@ static int bcm63xx_rng_remove(struct platform_device *pdev)
static struct platform_driver bcm63xx_rng_driver = { static struct platform_driver bcm63xx_rng_driver = {
.probe = bcm63xx_rng_probe, .probe = bcm63xx_rng_probe,
.remove = __devexit_p(bcm63xx_rng_remove), .remove = bcm63xx_rng_remove,
.driver = { .driver = {
.name = "bcm63xx-rng", .name = "bcm63xx-rng",
.owner = THIS_MODULE, .owner = THIS_MODULE,

View File

@ -101,7 +101,7 @@ static int exynos_read(struct hwrng *rng, void *buf,
return 4; return 4;
} }
static int __devinit exynos_rng_probe(struct platform_device *pdev) static int exynos_rng_probe(struct platform_device *pdev)
{ {
struct exynos_rng *exynos_rng; struct exynos_rng *exynos_rng;
@ -172,7 +172,7 @@ static struct platform_driver exynos_rng_driver = {
.pm = &exynos_rng_pm_ops, .pm = &exynos_rng_pm_ops,
}, },
.probe = exynos_rng_probe, .probe = exynos_rng_probe,
.remove = __devexit_p(exynos_rng_remove), .remove = exynos_rng_remove,
}; };
module_platform_driver(exynos_rng_driver); module_platform_driver(exynos_rng_driver);

View File

@ -611,7 +611,7 @@ static void n2rng_work(struct work_struct *work)
schedule_delayed_work(&np->work, HZ * 2); schedule_delayed_work(&np->work, HZ * 2);
} }
static void __devinit n2rng_driver_version(void) static void n2rng_driver_version(void)
{ {
static int n2rng_version_printed; static int n2rng_version_printed;
@ -620,7 +620,7 @@ static void __devinit n2rng_driver_version(void)
} }
static const struct of_device_id n2rng_match[]; static const struct of_device_id n2rng_match[];
static int __devinit n2rng_probe(struct platform_device *op) static int n2rng_probe(struct platform_device *op)
{ {
const struct of_device_id *match; const struct of_device_id *match;
int multi_capable; int multi_capable;
@ -767,7 +767,7 @@ static struct platform_driver n2rng_driver = {
.of_match_table = n2rng_match, .of_match_table = n2rng_match,
}, },
.probe = n2rng_probe, .probe = n2rng_probe,
.remove = __devexit_p(n2rng_remove), .remove = n2rng_remove,
}; };
module_platform_driver(n2rng_driver); module_platform_driver(n2rng_driver);

View File

@ -56,7 +56,7 @@ static int octeon_rng_data_read(struct hwrng *rng, u32 *data)
return sizeof(u32); return sizeof(u32);
} }
static int __devinit octeon_rng_probe(struct platform_device *pdev) static int octeon_rng_probe(struct platform_device *pdev)
{ {
struct resource *res_ports; struct resource *res_ports;
struct resource *res_result; struct resource *res_result;

View File

@ -104,7 +104,7 @@ static struct hwrng omap_rng_ops = {
.data_read = omap_rng_data_read, .data_read = omap_rng_data_read,
}; };
static int __devinit omap_rng_probe(struct platform_device *pdev) static int omap_rng_probe(struct platform_device *pdev)
{ {
struct omap_rng_private_data *priv; struct omap_rng_private_data *priv;
int ret; int ret;

View File

@ -94,7 +94,7 @@ static struct hwrng pasemi_rng = {
.data_read = pasemi_rng_data_read, .data_read = pasemi_rng_data_read,
}; };
static int __devinit rng_probe(struct platform_device *ofdev) static int rng_probe(struct platform_device *ofdev)
{ {
void __iomem *rng_regs; void __iomem *rng_regs;
struct device_node *rng_np = ofdev->dev.of_node; struct device_node *rng_np = ofdev->dev.of_node;

View File

@ -181,7 +181,7 @@ static const struct dev_pm_ops picoxcell_trng_pm_ops = {
static struct platform_driver picoxcell_trng_driver = { static struct platform_driver picoxcell_trng_driver = {
.probe = picoxcell_trng_probe, .probe = picoxcell_trng_probe,
.remove = __devexit_p(picoxcell_trng_remove), .remove = picoxcell_trng_remove,
.driver = { .driver = {
.name = "picoxcell-trng", .name = "picoxcell-trng",
.owner = THIS_MODULE, .owner = THIS_MODULE,

View File

@ -90,7 +90,7 @@ static struct hwrng ppc4xx_rng = {
.data_read = ppc4xx_rng_data_read, .data_read = ppc4xx_rng_data_read,
}; };
static int __devinit ppc4xx_rng_probe(struct platform_device *dev) static int ppc4xx_rng_probe(struct platform_device *dev)
{ {
void __iomem *rng_regs; void __iomem *rng_regs;
int err = 0; int err = 0;

View File

@ -88,7 +88,7 @@ static struct hwrng timeriomem_rng_ops = {
.priv = 0, .priv = 0,
}; };
static int __devinit timeriomem_rng_probe(struct platform_device *pdev) static int timeriomem_rng_probe(struct platform_device *pdev)
{ {
struct resource *res; struct resource *res;
int ret; int ret;
@ -146,7 +146,7 @@ static struct platform_driver timeriomem_rng_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.probe = timeriomem_rng_probe, .probe = timeriomem_rng_probe,
.remove = __devexit_p(timeriomem_rng_remove), .remove = timeriomem_rng_remove,
}; };
module_platform_driver(timeriomem_rng_driver); module_platform_driver(timeriomem_rng_driver);

View File

@ -147,7 +147,7 @@ static struct virtio_driver virtio_rng_driver = {
.driver.owner = THIS_MODULE, .driver.owner = THIS_MODULE,
.id_table = id_table, .id_table = id_table,
.probe = virtrng_probe, .probe = virtrng_probe,
.remove = __devexit_p(virtrng_remove), .remove = virtrng_remove,
#ifdef CONFIG_PM #ifdef CONFIG_PM
.freeze = virtrng_freeze, .freeze = virtrng_freeze,
.restore = virtrng_restore, .restore = virtrng_restore,

View File

@ -2243,7 +2243,7 @@ static const struct pnp_device_id pnp_dev_table[] = {
static struct pnp_driver ipmi_pnp_driver = { static struct pnp_driver ipmi_pnp_driver = {
.name = DEVICE_NAME, .name = DEVICE_NAME,
.probe = ipmi_pnp_probe, .probe = ipmi_pnp_probe,
.remove = __devexit_p(ipmi_pnp_remove), .remove = ipmi_pnp_remove,
.id_table = pnp_dev_table, .id_table = pnp_dev_table,
}; };
#endif #endif
@ -2546,7 +2546,7 @@ static struct pci_driver ipmi_pci_driver = {
.name = DEVICE_NAME, .name = DEVICE_NAME,
.id_table = ipmi_pci_devices, .id_table = ipmi_pci_devices,
.probe = ipmi_pci_probe, .probe = ipmi_pci_probe,
.remove = __devexit_p(ipmi_pci_remove), .remove = ipmi_pci_remove,
}; };
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
@ -2661,7 +2661,7 @@ static struct platform_driver ipmi_driver = {
.of_match_table = ipmi_match, .of_match_table = ipmi_match,
}, },
.probe = ipmi_probe, .probe = ipmi_probe,
.remove = __devexit_p(ipmi_remove), .remove = ipmi_remove,
}; };
static int wait_for_msg_done(struct smi_info *smi_info) static int wait_for_msg_done(struct smi_info *smi_info)

View File

@ -2186,11 +2186,7 @@ static struct virtio_driver virtio_console = {
#endif #endif
}; };
/* static struct virtio_driver virtio_rproc_serial = {
* virtio_rproc_serial refers to __devinit function which causes
* section mismatch warnings. So use __refdata to silence warnings.
*/
static struct virtio_driver __refdata virtio_rproc_serial = {
.feature_table = rproc_serial_features, .feature_table = rproc_serial_features,
.feature_table_size = ARRAY_SIZE(rproc_serial_features), .feature_table_size = ARRAY_SIZE(rproc_serial_features),
.driver.name = "virtio_rproc_serial", .driver.name = "virtio_rproc_serial",