Skip to content

Commit

Permalink
ARCH: drivers remove __dev* attributes.
Browse files Browse the repository at this point in the history
This fixes up all of the smaller arches that had __dev* markings for
their platform-specific drivers.

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 <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Hans-Christian Egtvedt <[email protected]>
Cc: Mike Frysinger <[email protected]>
Cc: Mikael Starvik <[email protected]>
Cc: Jesper Nilsson <[email protected]>
Cc: David Howells <[email protected]>
Cc: Hirokazu Takata <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Koichi Yasutake <[email protected]>
Cc: Jonas Bonn <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Chen Liqin <[email protected]>
Cc: Lennox Wu <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Guan Xuetao <[email protected]>
Cc: Bob Liu <[email protected]>
Cc: Srinivas Kandagatla <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Myron Stowe <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jesse Barnes <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Yinghai Lu <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Greg Ungerer <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: "Srivatsa S. Bhat" <[email protected]>
Cc: Mark Salter <[email protected]>
Cc: Yong Zhang <[email protected]>
Cc: Michael Holzheu <[email protected]>
Cc: Cornelia Huck <[email protected]>
Cc: Jan Glauber <[email protected]>
Cc: Wei Yongjun <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jan 3, 2013
1 parent f8d6c8d commit b881bc4
Show file tree
Hide file tree
Showing 27 changed files with 74 additions and 90 deletions.
2 changes: 1 addition & 1 deletion arch/arm64/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ static struct of_device_id armpmu_of_device_ids[] = {
{},
};

static int __devinit armpmu_device_probe(struct platform_device *pdev)
static int armpmu_device_probe(struct platform_device *pdev)
{
if (!cpu_pmu)
return -ENODEV;
Expand Down
2 changes: 1 addition & 1 deletion arch/avr32/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <asm/processor.h>
#include <asm/sysreg.h>

int __devinit read_current_timer(unsigned long *timer_value)
int read_current_timer(unsigned long *timer_value)
{
*timer_value = sysreg_read(COUNT);
return 0;
Expand Down
6 changes: 3 additions & 3 deletions arch/blackfin/mach-common/dpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static struct notifier_block vreg_cpufreq_notifier_block = {
* bfin_dpmc_probe -
*
*/
static int __devinit bfin_dpmc_probe(struct platform_device *pdev)
static int bfin_dpmc_probe(struct platform_device *pdev)
{
if (pdev->dev.platform_data)
pdata = pdev->dev.platform_data;
Expand All @@ -143,7 +143,7 @@ static int __devinit bfin_dpmc_probe(struct platform_device *pdev)
/**
* bfin_dpmc_remove -
*/
static int __devexit bfin_dpmc_remove(struct platform_device *pdev)
static int bfin_dpmc_remove(struct platform_device *pdev)
{
pdata = NULL;
return cpufreq_unregister_notifier(&vreg_cpufreq_notifier_block,
Expand All @@ -152,7 +152,7 @@ static int __devexit bfin_dpmc_remove(struct platform_device *pdev)

struct platform_driver bfin_dpmc_device_driver = {
.probe = bfin_dpmc_probe,
.remove = __devexit_p(bfin_dpmc_remove),
.remove = bfin_dpmc_remove,
.driver = {
.name = DRIVER_NAME,
}
Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v32/drivers/pci/bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <linux/kernel.h>
#include <arch/hwregs/intr_vect.h>

void __devinit pcibios_fixup_bus(struct pci_bus *b)
void pcibios_fixup_bus(struct pci_bus *b)
{
}

Expand Down
2 changes: 1 addition & 1 deletion arch/cris/arch-v32/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
cpumask_set_cpu(i, &phys_cpu_present_map);
}

void __devinit smp_prepare_boot_cpu(void)
void smp_prepare_boot_cpu(void)
{
/* PGD pointer has moved after per_cpu initialization so
* update the MMU.
Expand Down
2 changes: 1 addition & 1 deletion arch/frv/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ void __init setup_arch(char **cmdline_p)
/*
*
*/
static int __devinit setup_arch_serial(void)
static int setup_arch_serial(void)
{
/* register those serial ports that are available */
#ifndef CONFIG_GDBSTUB_UART0
Expand Down
6 changes: 3 additions & 3 deletions arch/frv/mb93090-mb00/pci-vdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static void __init pci_fixup_umc_ide(struct pci_dev *d)
d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
}

static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
static void pci_fixup_ide_bases(struct pci_dev *d)
{
int i;

Expand All @@ -287,7 +287,7 @@ static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
}
}

static void __devinit pci_fixup_ide_trash(struct pci_dev *d)
static void pci_fixup_ide_trash(struct pci_dev *d)
{
int i;

Expand All @@ -300,7 +300,7 @@ static void __devinit pci_fixup_ide_trash(struct pci_dev *d)
d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
}

static void __devinit pci_fixup_latency(struct pci_dev *d)
static void pci_fixup_latency(struct pci_dev *d)
{
/*
* SiS 5597 and 5598 chipsets require latency timer set to
Expand Down
2 changes: 1 addition & 1 deletion arch/m32r/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static void unmap_cpu_to_physid(int, int);
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
/* Boot up APs Routines : BSP */
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
void __devinit smp_prepare_boot_cpu(void)
void smp_prepare_boot_cpu(void)
{
bsp_phys_id = hard_smp_processor_id();
physid_set(bsp_phys_id, phys_cpu_present_map);
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/emu/nfeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ enum {
#define MAX_UNIT 8

/* These identify the driver base version and may not be removed. */
static const char version[] __devinitconst =
static const char version[] =
KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE
" S.Opichal, M.Jurik, P.Stehlik\n"
KERN_INFO " http://aranym.org/\n";
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/include/asm/parport.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2)

/* no dma, or IRQ autoprobing */
static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
static int parport_pc_find_isa_ports (int autoirq, int autodma);
static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
if (! (MACH_IS_Q40))
return 0; /* count=0 */
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/kernel/pcibios.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
return 0;
}

void __devinit pcibios_fixup_bus(struct pci_bus *bus)
void pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_dev *dev;

Expand All @@ -97,7 +97,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
}
}

char __devinit *pcibios_setup(char *str)
char *pcibios_setup(char *str)
{
return str;
}
Expand Down
28 changes: 14 additions & 14 deletions arch/microblaze/pci/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,8 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,
* - Some 32 bits platforms such as 4xx can have physical space larger than
* 32 bits so we need to use 64 bits values for the parsing
*/
void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
struct device_node *dev,
int primary)
void pci_process_bridge_OF_ranges(struct pci_controller *hose,
struct device_node *dev, int primary)
{
const u32 *ranges;
int rlen;
Expand Down Expand Up @@ -830,7 +829,7 @@ int pci_proc_domain(struct pci_bus *bus)
/* This header fixup will do the resource fixup for all devices as they are
* probed, but not for bridge ranges
*/
static void __devinit pcibios_fixup_resources(struct pci_dev *dev)
static void pcibios_fixup_resources(struct pci_dev *dev)
{
struct pci_controller *hose = pci_bus_to_host(dev->bus);
int i;
Expand Down Expand Up @@ -871,8 +870,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
* things go more smoothly when it gets it right. It should covers cases such
* as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges
*/
static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
struct resource *res)
static int pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
struct resource *res)
{
struct pci_controller *hose = pci_bus_to_host(bus);
struct pci_dev *dev = bus->self;
Expand Down Expand Up @@ -933,7 +932,7 @@ static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
}

/* Fixup resources of a PCI<->PCI bridge */
static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
static void pcibios_fixup_bridge(struct pci_bus *bus)
{
struct resource *res;
int i;
Expand Down Expand Up @@ -970,14 +969,14 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
}
}

void __devinit pcibios_setup_bus_self(struct pci_bus *bus)
void pcibios_setup_bus_self(struct pci_bus *bus)
{
/* Fix up the bus resources for P2P bridges */
if (bus->self != NULL)
pcibios_fixup_bridge(bus);
}

void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
void pcibios_setup_bus_devices(struct pci_bus *bus)
{
struct pci_dev *dev;

Expand All @@ -1002,7 +1001,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
}
}

void __devinit pcibios_fixup_bus(struct pci_bus *bus)
void pcibios_fixup_bus(struct pci_bus *bus)
{
/* When called from the generic PCI probe, read PCI<->PCI bridge
* bases. This is -not- called when generating the PCI tree from
Expand Down Expand Up @@ -1188,7 +1187,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
pcibios_allocate_bus_resources(b);
}

static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
static inline void alloc_resource(struct pci_dev *dev, int idx)
{
struct resource *pr, *r = &dev->resource[idx];

Expand Down Expand Up @@ -1351,7 +1350,7 @@ void __init pcibios_resource_survey(void)
* rest of the code later, for now, keep it as-is as our main
* resource allocation function doesn't deal with sub-trees yet.
*/
void __devinit pcibios_claim_one_bus(struct pci_bus *bus)
void pcibios_claim_one_bus(struct pci_bus *bus)
{
struct pci_dev *dev;
struct pci_bus *child_bus;
Expand Down Expand Up @@ -1410,7 +1409,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
return pci_enable_resources(dev, mask);
}

static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources)
static void pcibios_setup_phb_resources(struct pci_controller *hose,
struct list_head *resources)
{
unsigned long io_offset;
struct resource *res;
Expand Down Expand Up @@ -1477,7 +1477,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
return of_node_get(hose->dn);
}

static void __devinit pcibios_scan_phb(struct pci_controller *hose)
static void pcibios_scan_phb(struct pci_controller *hose)
{
LIST_HEAD(resources);
struct pci_bus *bus;
Expand Down
4 changes: 2 additions & 2 deletions arch/mn10300/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
* Set up the cpu_online_mask, cpu_callout_map and cpu_callin_map of the boot
* processor (CPU 0).
*/
void __devinit smp_prepare_boot_cpu(void)
void smp_prepare_boot_cpu(void)
{
cpumask_set_cpu(0, &cpu_callout_map);
cpumask_set_cpu(0, &cpu_callin_map);
Expand All @@ -930,7 +930,7 @@ void initialize_secondary(void)
* __cpu_up - Set smp_commenced_mask for the nominated CPU
* @cpu: The target CPU.
*/
int __devinit __cpu_up(unsigned int cpu, struct task_struct *tidle)
int __cpu_up(unsigned int cpu, struct task_struct *tidle)
{
int timeout;

Expand Down
6 changes: 3 additions & 3 deletions arch/mn10300/unit-asb2305/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static int __init pci_check_direct(void)
return -ENODEV;
}

static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
static int is_valid_resource(struct pci_dev *dev, int idx)
{
unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
struct resource *devr = &dev->resource[idx], *busr;
Expand All @@ -302,7 +302,7 @@ static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
return 0;
}

static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
static void pcibios_fixup_device_resources(struct pci_dev *dev)
{
int limit, i;

Expand All @@ -325,7 +325,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
* Called after each bus is probed, but before its children
* are examined.
*/
void __devinit pcibios_fixup_bus(struct pci_bus *bus)
void pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_dev *dev;

Expand Down
2 changes: 1 addition & 1 deletion arch/openrisc/lib/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <asm/timex.h>
#include <asm/processor.h>

int __devinit read_current_timer(unsigned long *timer_value)
int read_current_timer(unsigned long *timer_value)
{
*timer_value = mfspr(SPR_TTCR);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/parisc/include/asm/parport.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define _ASM_PARPORT_H 1


static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
/* nothing ! */
return 0;
Expand Down
7 changes: 3 additions & 4 deletions arch/parisc/kernel/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* so don't reference this table after starting the init process
*/

static struct hp_hardware hp_hardware_list[] __devinitdata = {
static struct hp_hardware hp_hardware_list[] = {
{HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
{HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
{HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
Expand Down Expand Up @@ -1230,7 +1230,7 @@ static struct hp_cpu_type_mask {
unsigned short model;
unsigned short mask;
enum cpu_type cpu;
} hp_cpu_type_mask_list[] __devinitdata = {
} hp_cpu_type_mask_list[] = {

{ 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */
{ 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */
Expand Down Expand Up @@ -1327,8 +1327,7 @@ const char * const cpu_name_version[][2] = {
[mako2] = { "PA8900 (Shortfin)", "2.0" }
};

const char * __devinit
parisc_hardware_description(struct parisc_device_id *id)
const char *parisc_hardware_description(struct parisc_device_id *id)
{
struct hp_hardware *listptr;

Expand Down
7 changes: 3 additions & 4 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,9 @@ static struct sclp_cpu_info *smp_get_cpu_info(void)
return info;
}

static int __devinit smp_add_present_cpu(int cpu);
static int smp_add_present_cpu(int cpu);

static int __devinit __smp_rescan_cpus(struct sclp_cpu_info *info,
int sysfs_add)
static int __smp_rescan_cpus(struct sclp_cpu_info *info, int sysfs_add)
{
struct pcpu *pcpu;
cpumask_t avail;
Expand Down Expand Up @@ -986,7 +985,7 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
return notifier_from_errno(err);
}

static int __devinit smp_add_present_cpu(int cpu)
static int smp_add_present_cpu(int cpu)
{
struct cpu *c = &pcpu_devices[cpu].cpu;
struct device *s = &c->dev;
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ unsigned int probe_irq_mask(unsigned long val)
}
EXPORT_SYMBOL_GPL(probe_irq_mask);

void __devinit pcibios_fixup_bus(struct pci_bus *bus)
void pcibios_fixup_bus(struct pci_bus *bus)
{
}

Expand Down
2 changes: 1 addition & 1 deletion arch/score/mm/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static inline void setup_protection_map(void)
protection_map[15] = PAGE_SHARED;
}

void __devinit cpu_cache_init(void)
void cpu_cache_init(void)
{
setup_protection_map();
}
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/drivers/pci/fixups-dreamcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <asm/irq.h>
#include <mach/pci.h>

static void __devinit gapspci_fixup_resources(struct pci_dev *dev)
static void gapspci_fixup_resources(struct pci_dev *dev)
{
struct pci_channel *p = dev->sysdata;

Expand Down
Loading

0 comments on commit b881bc4

Please sign in to comment.