Skip to content

Commit

Permalink
PCI: Move EXPORT_SYMBOL so it immediately follows function/variable
Browse files Browse the repository at this point in the history
Move EXPORT_SYMBOL so it immediately follows the function or variable.

No functional change.

[bhelgaas: squash similar changes, fix hotplug, probe, rom, search, too]
Signed-off-by: Ryan Desfosses <ryan@desfo.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Ryan Desfosses authored and Bjorn Helgaas committed Jun 10, 2014
1 parent 843a85c commit b7fe943
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 113 deletions.
6 changes: 3 additions & 3 deletions drivers/pci/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
type_mask, alignf, alignf_data,
&pci_32_bit);
}
EXPORT_SYMBOL(pci_bus_alloc_resource);

void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { }

Expand Down Expand Up @@ -253,6 +254,7 @@ void pci_bus_add_device(struct pci_dev *dev)

dev->is_added = 1;
}
EXPORT_SYMBOL_GPL(pci_bus_add_device);

/**
* pci_bus_add_devices - start driver for PCI devices
Expand All @@ -279,6 +281,7 @@ void pci_bus_add_devices(const struct pci_bus *bus)
pci_bus_add_devices(child);
}
}
EXPORT_SYMBOL(pci_bus_add_devices);

/** pci_walk_bus - walk devices on/under bus, calling callback.
* @top bus whose devices should be walked
Expand Down Expand Up @@ -344,6 +347,3 @@ void pci_bus_put(struct pci_bus *bus)
}
EXPORT_SYMBOL(pci_bus_put);

EXPORT_SYMBOL(pci_bus_alloc_resource);
EXPORT_SYMBOL_GPL(pci_bus_add_device);
EXPORT_SYMBOL(pci_bus_add_devices);
6 changes: 2 additions & 4 deletions drivers/pci/hotplug/acpiphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ MODULE_LICENSE("GPL");
MODULE_PARM_DESC(disable, "disable acpiphp driver");
module_param_named(disable, acpiphp_disabled, bool, 0444);

/* export the attention callback registration methods */
EXPORT_SYMBOL_GPL(acpiphp_register_attention);
EXPORT_SYMBOL_GPL(acpiphp_unregister_attention);

static int enable_slot (struct hotplug_slot *slot);
static int disable_slot (struct hotplug_slot *slot);
static int set_attention_status (struct hotplug_slot *slot, u8 value);
Expand Down Expand Up @@ -104,6 +100,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info)
}
return retval;
}
EXPORT_SYMBOL_GPL(acpiphp_register_attention);


/**
Expand All @@ -124,6 +121,7 @@ int acpiphp_unregister_attention(struct acpiphp_attention_info *info)
}
return retval;
}
EXPORT_SYMBOL_GPL(acpiphp_unregister_attention);


/**
Expand Down
13 changes: 6 additions & 7 deletions drivers/pci/hotplug/cpci_hotplug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
error:
return status;
}
EXPORT_SYMBOL_GPL(cpci_hp_register_bus);

int
cpci_hp_unregister_bus(struct pci_bus *bus)
Expand Down Expand Up @@ -329,6 +330,7 @@ cpci_hp_unregister_bus(struct pci_bus *bus)
up_write(&list_rwsem);
return status;
}
EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus);

/* This is the interrupt mode interrupt handler */
static irqreturn_t
Expand Down Expand Up @@ -614,6 +616,7 @@ cpci_hp_register_controller(struct cpci_hp_controller *new_controller)
controller = new_controller;
return status;
}
EXPORT_SYMBOL_GPL(cpci_hp_register_controller);

static void
cleanup_slots(void)
Expand Down Expand Up @@ -653,6 +656,7 @@ cpci_hp_unregister_controller(struct cpci_hp_controller *old_controller)
status = -ENODEV;
return status;
}
EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller);

int
cpci_hp_start(void)
Expand Down Expand Up @@ -690,6 +694,7 @@ cpci_hp_start(void)
dbg("%s - exit", __func__);
return 0;
}
EXPORT_SYMBOL_GPL(cpci_hp_start);

int
cpci_hp_stop(void)
Expand All @@ -704,6 +709,7 @@ cpci_hp_stop(void)
cpci_stop_thread();
return 0;
}
EXPORT_SYMBOL_GPL(cpci_hp_stop);

int __init
cpci_hotplug_init(int debug)
Expand All @@ -721,10 +727,3 @@ cpci_hotplug_exit(void)
cpci_hp_stop();
cpci_hp_unregister_controller(controller);
}

EXPORT_SYMBOL_GPL(cpci_hp_register_controller);
EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller);
EXPORT_SYMBOL_GPL(cpci_hp_register_bus);
EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus);
EXPORT_SYMBOL_GPL(cpci_hp_start);
EXPORT_SYMBOL_GPL(cpci_hp_stop);
7 changes: 3 additions & 4 deletions drivers/pci/hotplug/pci_hotplug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
mutex_unlock(&pci_hp_mutex);
return result;
}
EXPORT_SYMBOL_GPL(__pci_hp_register);

/**
* pci_hp_deregister - deregister a hotplug_slot with the PCI hotplug subsystem
Expand Down Expand Up @@ -506,6 +507,7 @@ int pci_hp_deregister(struct hotplug_slot *hotplug)

return 0;
}
EXPORT_SYMBOL_GPL(pci_hp_deregister);

/**
* pci_hp_change_slot_info - changes the slot's information structure in the core
Expand All @@ -527,6 +529,7 @@ int pci_hp_change_slot_info(struct hotplug_slot *hotplug,

return 0;
}
EXPORT_SYMBOL_GPL(pci_hp_change_slot_info);

static int __init pci_hotplug_init (void)
{
Expand Down Expand Up @@ -557,7 +560,3 @@ MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
module_param(debug, bool, 0644);
MODULE_PARM_DESC(debug, "Debugging mode enabled or not");

EXPORT_SYMBOL_GPL(__pci_hp_register);
EXPORT_SYMBOL_GPL(pci_hp_deregister);
EXPORT_SYMBOL_GPL(pci_hp_change_slot_info);
7 changes: 3 additions & 4 deletions drivers/pci/hotplug/rpaphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

bool rpaphp_debug;
LIST_HEAD(rpaphp_slot_head);
EXPORT_SYMBOL_GPL(rpaphp_slot_head);

#define DRIVER_VERSION "0.1"
#define DRIVER_AUTHOR "Linda Xie <lxie@us.ibm.com>"
Expand Down Expand Up @@ -241,6 +242,7 @@ int rpaphp_get_drc_props(struct device_node *dn, int *drc_index,

return -EINVAL;
}
EXPORT_SYMBOL_GPL(rpaphp_get_drc_props);

static int is_php_type(char *drc_type)
{
Expand Down Expand Up @@ -350,6 +352,7 @@ int rpaphp_add_slot(struct device_node *dn)
/* XXX FIXME: reports a failure only if last entry in loop failed */
return retval;
}
EXPORT_SYMBOL_GPL(rpaphp_add_slot);

static void __exit cleanup_slots(void)
{
Expand Down Expand Up @@ -443,7 +446,3 @@ struct hotplug_slot_ops rpaphp_hotplug_slot_ops = {

module_init(rpaphp_init);
module_exit(rpaphp_exit);

EXPORT_SYMBOL_GPL(rpaphp_add_slot);
EXPORT_SYMBOL_GPL(rpaphp_slot_head);
EXPORT_SYMBOL_GPL(rpaphp_get_drc_props);
5 changes: 2 additions & 3 deletions drivers/pci/htirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update)

return irq;
}
EXPORT_SYMBOL(__ht_create_irq);

/**
* ht_create_irq - create an irq and attach it to a device.
Expand All @@ -151,6 +152,7 @@ int ht_create_irq(struct pci_dev *dev, int idx)
{
return __ht_create_irq(dev, idx, NULL);
}
EXPORT_SYMBOL(ht_create_irq);

/**
* ht_destroy_irq - destroy an irq created with ht_create_irq
Expand All @@ -170,7 +172,4 @@ void ht_destroy_irq(unsigned int irq)

kfree(cfg);
}

EXPORT_SYMBOL(__ht_create_irq);
EXPORT_SYMBOL(ht_create_irq);
EXPORT_SYMBOL(ht_destroy_irq);
18 changes: 8 additions & 10 deletions drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ int pci_add_dynid(struct pci_driver *drv,

return retval;
}
EXPORT_SYMBOL_GPL(pci_add_dynid);

static void pci_free_dynids(struct pci_driver *drv)
{
Expand Down Expand Up @@ -235,6 +236,7 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids,
}
return NULL;
}
EXPORT_SYMBOL(pci_match_id);

static const struct pci_device_id pci_device_id_any = {
.vendor = PCI_ANY_ID,
Expand Down Expand Up @@ -1255,6 +1257,7 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner,
/* register with core */
return driver_register(&drv->driver);
}
EXPORT_SYMBOL(__pci_register_driver);

/**
* pci_unregister_driver - unregister a pci driver
Expand All @@ -1272,6 +1275,7 @@ pci_unregister_driver(struct pci_driver *drv)
driver_unregister(&drv->driver);
pci_free_dynids(drv);
}
EXPORT_SYMBOL(pci_unregister_driver);

static struct pci_driver pci_compat_driver = {
.name = "compat"
Expand All @@ -1297,6 +1301,7 @@ pci_dev_driver(const struct pci_dev *dev)
}
return NULL;
}
EXPORT_SYMBOL(pci_dev_driver);

/**
* pci_bus_match - Tell if a PCI device structure has a matching PCI device id structure
Expand Down Expand Up @@ -1342,6 +1347,7 @@ struct pci_dev *pci_dev_get(struct pci_dev *dev)
get_device(&dev->dev);
return dev;
}
EXPORT_SYMBOL(pci_dev_get);

/**
* pci_dev_put - release a use of the pci device structure
Expand All @@ -1355,6 +1361,7 @@ void pci_dev_put(struct pci_dev *dev)
if (dev)
put_device(&dev->dev);
}
EXPORT_SYMBOL(pci_dev_put);

static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
{
Expand Down Expand Up @@ -1400,19 +1407,10 @@ struct bus_type pci_bus_type = {
.drv_groups = pci_drv_groups,
.pm = PCI_PM_OPS_PTR,
};
EXPORT_SYMBOL(pci_bus_type);

static int __init pci_driver_init(void)
{
return bus_register(&pci_bus_type);
}

postcore_initcall(pci_driver_init);

EXPORT_SYMBOL_GPL(pci_add_dynid);
EXPORT_SYMBOL(pci_match_id);
EXPORT_SYMBOL(__pci_register_driver);
EXPORT_SYMBOL(pci_unregister_driver);
EXPORT_SYMBOL(pci_dev_driver);
EXPORT_SYMBOL(pci_bus_type);
EXPORT_SYMBOL(pci_dev_get);
EXPORT_SYMBOL(pci_dev_put);
Loading

0 comments on commit b7fe943

Please sign in to comment.