Skip to content

Commit

Permalink
POWERPC: drivers: remove __dev* attributes.
Browse files Browse the repository at this point in the history
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: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jan 3, 2013
1 parent 7c9503b commit cad5cef
Show file tree
Hide file tree
Showing 65 changed files with 172 additions and 188 deletions.
6 changes: 3 additions & 3 deletions arch/powerpc/include/asm/eeh.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,16 @@ static inline void eeh_unlock(void)
#define EEH_MAX_ALLOWED_FREEZES 5

typedef void *(*eeh_traverse_func)(void *data, void *flag);
int __devinit eeh_phb_pe_create(struct pci_controller *phb);
int eeh_phb_pe_create(struct pci_controller *phb);
int eeh_add_to_parent_pe(struct eeh_dev *edev);
int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe);
void *eeh_pe_dev_traverse(struct eeh_pe *root,
eeh_traverse_func fn, void *flag);
void eeh_pe_restore_bars(struct eeh_pe *pe);
struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe);

void * __devinit eeh_dev_init(struct device_node *dn, void *data);
void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb);
void *eeh_dev_init(struct device_node *dn, void *data);
void eeh_dev_phb_init_dynamic(struct pci_controller *phb);
int __init eeh_ops_register(struct eeh_ops *ops);
int __exit eeh_ops_unregister(const char *name);
unsigned long eeh_check_failure(const volatile void __iomem *token,
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/include/asm/io-workarounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ struct iowa_bus {
void *private;
};

void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
int (*)(struct iowa_bus *, void *), void *);
void iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
int (*)(struct iowa_bus *, void *), void *);
struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
struct iowa_bus *iowa_pio_find_bus(unsigned long);

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/parport.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <asm/prom.h>

static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
{
struct device_node *np;
const u32 *prop;
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ struct smp_ops_t {

extern void smp_send_debugger_break(void);
extern void start_secondary_resume(void);
extern void __devinit smp_generic_give_timebase(void);
extern void __devinit smp_generic_take_timebase(void);
extern void smp_generic_give_timebase(void);
extern void smp_generic_take_timebase(void);

DECLARE_PER_CPU(unsigned int, cpu_pvr);

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/vio.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ extern void vio_unregister_driver(struct vio_driver *drv);
extern int vio_cmo_entitlement_update(size_t);
extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired);

extern void __devinit vio_unregister_device(struct vio_dev *dev);
extern void vio_unregister_device(struct vio_dev *dev);

extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op);

Expand Down
9 changes: 4 additions & 5 deletions arch/powerpc/kernel/io-workarounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static void iowa_##name at \
#undef DEF_PCI_AC_RET
#undef DEF_PCI_AC_NORET

static const struct ppc_pci_io __devinitconst iowa_pci_io = {
static const struct ppc_pci_io iowa_pci_io = {

#define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name,
#define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name,
Expand Down Expand Up @@ -146,7 +146,7 @@ static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
}

/* Enable IO workaround */
static void __devinit io_workaround_init(void)
static void io_workaround_init(void)
{
static int io_workaround_inited;

Expand All @@ -158,9 +158,8 @@ static void __devinit io_workaround_init(void)
}

/* Register new bus to support workaround */
void __devinit iowa_register_bus(struct pci_controller *phb,
struct ppc_pci_io *ops,
int (*initfunc)(struct iowa_bus *, void *), void *data)
void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,
int (*initfunc)(struct iowa_bus *, void *), void *data)
{
struct iowa_bus *bus;
struct device_node *np = phb->dn;
Expand Down
12 changes: 6 additions & 6 deletions arch/powerpc/kernel/isa-bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
#define ISA_SPACE_MASK 0x1
#define ISA_SPACE_IO 0x1

static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
unsigned long phb_io_base_phys)
static void pci_process_ISA_OF_ranges(struct device_node *isa_node,
unsigned long phb_io_base_phys)
{
/* We should get some saner parsing here and remove these structs */
struct pci_address {
Expand Down Expand Up @@ -170,8 +170,8 @@ void __init isa_bridge_find_early(struct pci_controller *hose)
* isa_bridge_find_late - Find and map the ISA IO space upon discovery of
* a new ISA bridge
*/
static void __devinit isa_bridge_find_late(struct pci_dev *pdev,
struct device_node *devnode)
static void isa_bridge_find_late(struct pci_dev *pdev,
struct device_node *devnode)
{
struct pci_controller *hose = pci_bus_to_host(pdev->bus);

Expand Down Expand Up @@ -215,8 +215,8 @@ static void isa_bridge_remove(void)
/**
* isa_bridge_notify - Get notified of PCI devices addition/removal
*/
static int __devinit isa_bridge_notify(struct notifier_block *nb,
unsigned long action, void *data)
static int isa_bridge_notify(struct notifier_block *nb, unsigned long action,
void *data)
{
struct device *dev = data;
struct pci_dev *pdev = to_pci_dev(dev);
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/of_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* lacking some bits needed here.
*/

static int __devinit of_pci_phb_probe(struct platform_device *dev)
static int of_pci_phb_probe(struct platform_device *dev)
{
struct pci_controller *phb;

Expand Down
28 changes: 14 additions & 14 deletions arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,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 @@ -848,7 +847,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 @@ -902,8 +901,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 @@ -967,7 +966,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 @@ -1007,7 +1006,7 @@ 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)
Expand All @@ -1024,7 +1023,7 @@ void __devinit pcibios_setup_bus_self(struct pci_bus *bus)
ppc_md.pci_dma_bus_setup(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 Down Expand Up @@ -1063,7 +1062,7 @@ void pcibios_set_master(struct pci_dev *dev)
/* No special bus mastering setup handling */
}

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 All @@ -1080,7 +1079,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
}
EXPORT_SYMBOL(pcibios_fixup_bus);

void __devinit pci_fixup_cardbus(struct pci_bus *bus)
void pci_fixup_cardbus(struct pci_bus *bus)
{
/* Now fixup devices on that bus */
pcibios_setup_bus_devices(bus);
Expand Down Expand Up @@ -1264,7 +1263,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 @@ -1500,7 +1499,8 @@ resource_size_t pcibios_io_space_offset(struct pci_controller *hose)
return (unsigned long) hose->io_base_virt - _IO_BASE;
}

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)
{
struct resource *res;
int i;
Expand Down Expand Up @@ -1639,7 +1639,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
* pci_scan_phb - Given a pci_controller, setup and scan the PCI bus
* @hose: Pointer to the PCI host controller instance structure
*/
void __devinit pcibios_scan_phb(struct pci_controller *hose)
void pcibios_scan_phb(struct pci_controller *hose)
{
LIST_HEAD(resources);
struct pci_bus *bus;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/pci_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pci_create_OF_bus_map(void)
}
}

void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose)
void pcibios_setup_phb_io_space(struct pci_controller *hose)
{
unsigned long io_offset;
struct resource *res = &hose->io_resource;
Expand Down
6 changes: 3 additions & 3 deletions arch/powerpc/kernel/pci_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
}
EXPORT_SYMBOL_GPL(pcibios_unmap_io_space);

static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose)
static int pcibios_map_phb_io_space(struct pci_controller *hose)
{
struct vm_struct *area;
unsigned long phys_page;
Expand Down Expand Up @@ -173,7 +173,7 @@ static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose)
return 0;
}

int __devinit pcibios_map_io_space(struct pci_bus *bus)
int pcibios_map_io_space(struct pci_bus *bus)
{
WARN_ON(bus == NULL);

Expand All @@ -193,7 +193,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
}
EXPORT_SYMBOL_GPL(pcibios_map_io_space);

void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose)
void pcibios_setup_phb_io_space(struct pci_controller *hose)
{
pcibios_map_phb_io_space(hose);
}
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/kernel/pci_dn.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Traverse_func that inits the PCI fields of the device node.
* NOTE: this *must* be done before read/write config to the device.
*/
void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
void *update_dn_pci_info(struct device_node *dn, void *data)
{
struct pci_controller *phb = data;
const int *type =
Expand Down Expand Up @@ -129,7 +129,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
* subsystem is set up, before kmalloc is valid) and during the
* dynamic lpar operation of adding a PHB to a running system.
*/
void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb)
void pci_devs_phb_init_dynamic(struct pci_controller *phb)
{
struct device_node *dn = phb->dn;
struct pci_dn *pdn;
Expand Down
12 changes: 5 additions & 7 deletions arch/powerpc/kernel/pci_of_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ EXPORT_SYMBOL(of_create_pci_dev);
* this routine in turn call of_scan_bus() recusively to scan for more child
* devices.
*/
void __devinit of_scan_pci_bridge(struct pci_dev *dev)
void of_scan_pci_bridge(struct pci_dev *dev)
{
struct device_node *node = dev->dev.of_node;
struct pci_bus *bus;
Expand Down Expand Up @@ -299,8 +299,8 @@ EXPORT_SYMBOL(of_scan_pci_bridge);
* @bus: pci_bus structure for the PCI bus
* @rescan_existing: Flag indicating bus has already been set up
*/
static void __devinit __of_scan_bus(struct device_node *node,
struct pci_bus *bus, int rescan_existing)
static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,
int rescan_existing)
{
struct device_node *child;
const u32 *reg;
Expand Down Expand Up @@ -348,8 +348,7 @@ static void __devinit __of_scan_bus(struct device_node *node,
* @node: device tree node for the PCI bus
* @bus: pci_bus structure for the PCI bus
*/
void __devinit of_scan_bus(struct device_node *node,
struct pci_bus *bus)
void of_scan_bus(struct device_node *node, struct pci_bus *bus)
{
__of_scan_bus(node, bus, 0);
}
Expand All @@ -363,8 +362,7 @@ EXPORT_SYMBOL_GPL(of_scan_bus);
* Same as of_scan_bus, but for a pci_bus structure that has already been
* setup.
*/
void __devinit of_rescan_bus(struct device_node *node,
struct pci_bus *bus)
void of_rescan_bus(struct device_node *node, struct pci_bus *bus)
{
__of_scan_bus(node, bus, 1);
}
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/kernel/rtas_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void __init init_pci_config_tokens (void)
ibm_write_pci_config = rtas_token("ibm,write-pci-config");
}

unsigned long __devinit get_phb_buid (struct device_node *phb)
unsigned long get_phb_buid (struct device_node *phb)
{
struct resource r;

Expand Down Expand Up @@ -237,7 +237,7 @@ static int phb_set_bus_ranges(struct device_node *dev,
return 0;
}

int __devinit rtas_setup_phb(struct pci_controller *phb)
int rtas_setup_phb(struct pci_controller *phb)
{
struct device_node *dev = phb->dn;

Expand Down
8 changes: 4 additions & 4 deletions arch/powerpc/kernel/smp-tbsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ static struct {

static volatile int running;

static void __devinit enter_contest(u64 mark, long add)
static void enter_contest(u64 mark, long add)
{
while (get_tb() < mark)
tbsync->race_result = add;
}

void __devinit smp_generic_take_timebase(void)
void smp_generic_take_timebase(void)
{
int cmd;
u64 tb;
Expand Down Expand Up @@ -75,7 +75,7 @@ void __devinit smp_generic_take_timebase(void)
local_irq_restore(flags);
}

static int __devinit start_contest(int cmd, long offset, int num)
static int start_contest(int cmd, long offset, int num)
{
int i, score=0;
u64 tb;
Expand Down Expand Up @@ -110,7 +110,7 @@ static int __devinit start_contest(int cmd, long offset, int num)
return score;
}

void __devinit smp_generic_give_timebase(void)
void smp_generic_give_timebase(void)
{
int i, score, score2, old, min=0, max=5000, offset=1000;

Expand Down
Loading

0 comments on commit cad5cef

Please sign in to comment.