Drivers: char: remove __dev* attributes.
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2012 23:12:08 +0000 (15:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jan 2013 23:57:15 +0000 (15:57 -0800)
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>
26 files changed:
drivers/char/agp/ali-agp.c
drivers/char/agp/amd-k7-agp.c
drivers/char/agp/amd64-agp.c
drivers/char/agp/ati-agp.c
drivers/char/agp/efficeon-agp.c
drivers/char/agp/i460-agp.c
drivers/char/agp/intel-agp.c
drivers/char/agp/nvidia-agp.c
drivers/char/agp/sgi-agp.c
drivers/char/agp/sis-agp.c
drivers/char/agp/sworks-agp.c
drivers/char/agp/uninorth-agp.c
drivers/char/agp/via-agp.c
drivers/char/hw_random/atmel-rng.c
drivers/char/hw_random/bcm63xx-rng.c
drivers/char/hw_random/exynos-rng.c
drivers/char/hw_random/n2-drv.c
drivers/char/hw_random/octeon-rng.c
drivers/char/hw_random/omap-rng.c
drivers/char/hw_random/pasemi-rng.c
drivers/char/hw_random/picoxcell-rng.c
drivers/char/hw_random/ppc4xx-rng.c
drivers/char/hw_random/timeriomem-rng.c
drivers/char/hw_random/virtio-rng.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/virtio_console.c

index 4784935..443cd67 100644 (file)
@@ -299,8 +299,7 @@ static struct agp_device_ids ali_agp_device_ids[] =
        { }, /* dummy final entry, always present */
 };
 
-static int __devinit agp_ali_probe(struct pci_dev *pdev,
-                               const struct pci_device_id *ent)
+static int agp_ali_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        struct agp_device_ids *devs = ali_agp_device_ids;
        struct agp_bridge_data *bridge;
index 1b21011..779f0ab 100644 (file)
@@ -405,8 +405,8 @@ static struct agp_device_ids amd_agp_device_ids[] =
        { }, /* dummy final entry, always present */
 };
 
-static int __devinit agp_amdk7_probe(struct pci_dev *pdev,
-                                    const struct pci_device_id *ent)
+static int agp_amdk7_probe(struct pci_dev *pdev,
+                          const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
        u8 cap_ptr;
index 061d462..d79d692 100644 (file)
@@ -240,7 +240,7 @@ static const struct agp_bridge_driver amd_8151_driver = {
 };
 
 /* 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))
                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
  * crashing.
  */
-static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
-                                                                u16 cap)
+static int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, u16 cap)
 {
        u32 aper_low, aper_hi;
        u64 aper, nb_aper;
@@ -326,7 +325,7 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
        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;
 
@@ -352,7 +351,7 @@ static __devinit int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
 }
 
 /* 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;
 
@@ -390,7 +389,7 @@ static const struct aper_size_info_32 uli_sizes[7] =
        {8, 2048, 1, 4},
        {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;
        struct pci_dev *dev1;
@@ -513,8 +512,8 @@ put:
        return ret;
 }
 
-static int __devinit agp_amd64_probe(struct pci_dev *pdev,
-                                    const struct pci_device_id *ent)
+static int agp_amd64_probe(struct pci_dev *pdev,
+                          const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
        u8 cap_ptr;
index ed04335..0628d7b 100644 (file)
@@ -490,8 +490,7 @@ static struct agp_device_ids ati_agp_device_ids[] =
        { }, /* dummy final entry, always present */
 };
 
-static int __devinit agp_ati_probe(struct pci_dev *pdev,
-                                  const struct pci_device_id *ent)
+static int agp_ati_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        struct agp_device_ids *devs = ati_agp_device_ids;
        struct agp_bridge_data *bridge;
index 55f3e33..6974d50 100644 (file)
@@ -343,8 +343,8 @@ static const struct agp_bridge_driver efficeon_driver = {
        .agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
-static int __devinit agp_efficeon_probe(struct pci_dev *pdev,
-                                    const struct pci_device_id *ent)
+static int agp_efficeon_probe(struct pci_dev *pdev,
+                             const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
        u8 cap_ptr;
index d328b66..15b240e 100644 (file)
@@ -587,8 +587,8 @@ const struct agp_bridge_driver intel_i460_driver = {
        .cant_use_aperture      = true,
 };
 
-static int __devinit agp_intel_i460_probe(struct pci_dev *pdev,
-                                         const struct pci_device_id *ent)
+static int agp_intel_i460_probe(struct pci_dev *pdev,
+                               const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
        u8 cap_ptr;
@@ -637,7 +637,7 @@ static struct pci_driver agp_intel_i460_pci_driver = {
        .name           = "agpgart-intel-i460",
        .id_table       = agp_intel_i460_pci_table,
        .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)
index f3a8f52..a426ee1 100644 (file)
@@ -732,8 +732,8 @@ static const struct intel_agp_driver_description {
        { 0, NULL, NULL }
 };
 
-static int __devinit agp_intel_probe(struct pci_dev *pdev,
-                                    const struct pci_device_id *ent)
+static int agp_intel_probe(struct pci_dev *pdev,
+                          const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
        u8 cap_ptr = 0;
@@ -912,7 +912,7 @@ static struct pci_driver agp_intel_pci_driver = {
        .name           = "agpgart-intel",
        .id_table       = agp_intel_pci_table,
        .probe          = agp_intel_probe,
-       .remove         = __devexit_p(agp_intel_remove),
+       .remove         = agp_intel_remove,
 #ifdef CONFIG_PM
        .resume         = agp_intel_resume,
 #endif
index 66e0868..62be3ec 100644 (file)
@@ -332,8 +332,8 @@ static const struct agp_bridge_driver nvidia_driver = {
        .agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
-static int __devinit agp_nvidia_probe(struct pci_dev *pdev,
-                                     const struct pci_device_id *ent)
+static int agp_nvidia_probe(struct pci_dev *pdev,
+                           const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
        u8 cap_ptr;
index a18791d..05b8d02 100644 (file)
@@ -270,7 +270,7 @@ const struct agp_bridge_driver sgi_tioca_driver = {
        .num_aperture_sizes = 1,
 };
 
-static int __devinit agp_sgi_init(void)
+static int agp_sgi_init(void)
 {
        unsigned int j;
        struct tioca_kernel *info;
index 93d1d31..79c838c 100644 (file)
@@ -154,7 +154,7 @@ static int sis_broken_chipsets[] = {
        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;
 
@@ -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,
-                                  const struct pci_device_id *ent)
+static int agp_sis_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
        u8 cap_ptr;
index 26020fb..9b163b4 100644 (file)
@@ -445,8 +445,8 @@ static const struct agp_bridge_driver sworks_driver = {
        .agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
-static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
-                                          const struct pci_device_id *ent)
+static int agp_serverworks_probe(struct pci_dev *pdev,
+                                const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
        struct pci_dev *bridge_dev;
index 011967a..a56ee9b 100644 (file)
@@ -592,8 +592,8 @@ static struct agp_device_ids uninorth_agp_device_ids[] = {
        },
 };
 
-static int __devinit agp_uninorth_probe(struct pci_dev *pdev,
-                                       const struct pci_device_id *ent)
+static int agp_uninorth_probe(struct pci_dev *pdev,
+                             const struct pci_device_id *ent)
 {
        struct agp_device_ids *devs = uninorth_agp_device_ids;
        struct agp_bridge_data *bridge;
index 6818595..74d3aa3 100644 (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,
-                                  const struct pci_device_id *ent)
+static int agp_via_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        struct agp_device_ids *devs = via_agp_device_ids;
        struct agp_bridge_data *bridge;
index 5a4a6e7..7c73d4a 100644 (file)
@@ -138,7 +138,7 @@ static const struct dev_pm_ops atmel_trng_pm_ops = {
 
 static struct platform_driver atmel_trng_driver = {
        .probe          = atmel_trng_probe,
-       .remove         = __devexit_p(atmel_trng_remove),
+       .remove         = atmel_trng_remove,
        .driver         = {
                .name   = "atmel-trng",
                .owner  = THIS_MODULE,
index ae95bcb..f343b7d 100644 (file)
@@ -61,7 +61,7 @@ static int bcm63xx_rng_data_read(struct hwrng *rng, u32 *data)
        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 clk *clk;
@@ -161,7 +161,7 @@ static int bcm63xx_rng_remove(struct platform_device *pdev)
 
 static struct platform_driver bcm63xx_rng_driver = {
        .probe          = bcm63xx_rng_probe,
-       .remove         = __devexit_p(bcm63xx_rng_remove),
+       .remove         = bcm63xx_rng_remove,
        .driver         = {
                .name   = "bcm63xx-rng",
                .owner  = THIS_MODULE,
index bdc852e..48bbfec 100644 (file)
@@ -101,7 +101,7 @@ static int exynos_read(struct hwrng *rng, void *buf,
        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;
 
@@ -172,7 +172,7 @@ static struct platform_driver exynos_rng_driver = {
                .pm     = &exynos_rng_pm_ops,
        },
        .probe          = exynos_rng_probe,
-       .remove         = __devexit_p(exynos_rng_remove),
+       .remove         = exynos_rng_remove,
 };
 
 module_platform_driver(exynos_rng_driver);
index d68a72a..20b962e 100644 (file)
@@ -611,7 +611,7 @@ static void n2rng_work(struct work_struct *work)
                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;
 
@@ -620,7 +620,7 @@ static void __devinit n2rng_driver_version(void)
 }
 
 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;
        int multi_capable;
@@ -767,7 +767,7 @@ static struct platform_driver n2rng_driver = {
                .of_match_table = n2rng_match,
        },
        .probe          = n2rng_probe,
-       .remove         = __devexit_p(n2rng_remove),
+       .remove         = n2rng_remove,
 };
 
 module_platform_driver(n2rng_driver);
index 5c34c09..1eada56 100644 (file)
@@ -56,7 +56,7 @@ static int octeon_rng_data_read(struct hwrng *rng, u32 *data)
        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_result;
index 45e467d..d8c54e2 100644 (file)
@@ -104,7 +104,7 @@ static struct hwrng omap_rng_ops = {
        .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;
        int ret;
index a1f7040..c6df5b2 100644 (file)
@@ -94,7 +94,7 @@ static struct hwrng pasemi_rng = {
        .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;
        struct device_node *rng_np = ofdev->dev.of_node;
index d4b24c1..973b951 100644 (file)
@@ -181,7 +181,7 @@ static const struct dev_pm_ops picoxcell_trng_pm_ops = {
 
 static struct platform_driver picoxcell_trng_driver = {
        .probe          = picoxcell_trng_probe,
-       .remove         = __devexit_p(picoxcell_trng_remove),
+       .remove         = picoxcell_trng_remove,
        .driver         = {
                .name   = "picoxcell-trng",
                .owner  = THIS_MODULE,
index af6506a..732c330 100644 (file)
@@ -90,7 +90,7 @@ static struct hwrng ppc4xx_rng = {
        .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;
        int err = 0;
index 3a1abc9..849db19 100644 (file)
@@ -88,7 +88,7 @@ static struct hwrng timeriomem_rng_ops = {
        .priv           = 0,
 };
 
-static int __devinit timeriomem_rng_probe(struct platform_device *pdev)
+static int timeriomem_rng_probe(struct platform_device *pdev)
 {
        struct resource *res;
        int ret;
@@ -146,7 +146,7 @@ static struct platform_driver timeriomem_rng_driver = {
                .owner          = THIS_MODULE,
        },
        .probe          = timeriomem_rng_probe,
-       .remove         = __devexit_p(timeriomem_rng_remove),
+       .remove         = timeriomem_rng_remove,
 };
 
 module_platform_driver(timeriomem_rng_driver);
index 621f595..b65c103 100644 (file)
@@ -147,7 +147,7 @@ static struct virtio_driver virtio_rng_driver = {
        .driver.owner = THIS_MODULE,
        .id_table =     id_table,
        .probe =        virtrng_probe,
-       .remove =       __devexit_p(virtrng_remove),
+       .remove =       virtrng_remove,
 #ifdef CONFIG_PM
        .freeze =       virtrng_freeze,
        .restore =      virtrng_restore,
index cfdfecd..1c7fdcd 100644 (file)
@@ -2243,7 +2243,7 @@ static const struct pnp_device_id pnp_dev_table[] = {
 static struct pnp_driver ipmi_pnp_driver = {
        .name           = DEVICE_NAME,
        .probe          = ipmi_pnp_probe,
-       .remove         = __devexit_p(ipmi_pnp_remove),
+       .remove         = ipmi_pnp_remove,
        .id_table       = pnp_dev_table,
 };
 #endif
@@ -2546,7 +2546,7 @@ static struct pci_driver ipmi_pci_driver = {
        .name =         DEVICE_NAME,
        .id_table =     ipmi_pci_devices,
        .probe =        ipmi_pci_probe,
-       .remove =       __devexit_p(ipmi_pci_remove),
+       .remove =       ipmi_pci_remove,
 };
 #endif /* CONFIG_PCI */
 
@@ -2661,7 +2661,7 @@ static struct platform_driver ipmi_driver = {
                .of_match_table = ipmi_match,
        },
        .probe          = ipmi_probe,
-       .remove         = __devexit_p(ipmi_remove),
+       .remove         = ipmi_remove,
 };
 
 static int wait_for_msg_done(struct smi_info *smi_info)
index c594cb1..684b0d5 100644 (file)
@@ -2186,11 +2186,7 @@ static struct virtio_driver virtio_console = {
 #endif
 };
 
-/*
- * 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 = {
+static struct virtio_driver virtio_rproc_serial = {
        .feature_table = rproc_serial_features,
        .feature_table_size = ARRAY_SIZE(rproc_serial_features),
        .driver.name =  "virtio_rproc_serial",