Commit 1e6d9abe authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Drivers: infinband: 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,
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: Tom Tucker <tom@opengridcomputing.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: Roland Dreier <roland@kernel.org>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Cc: Christoph Raisch <raisch@de.ibm.com>
Cc: Mike Marciniszyn <infinipath@intel.com>
Cc: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 27796aa0
...@@ -920,8 +920,7 @@ static struct net_device *c2_devinit(struct c2_dev *c2dev, ...@@ -920,8 +920,7 @@ static struct net_device *c2_devinit(struct c2_dev *c2dev,
return netdev; return netdev;
} }
static int __devinit c2_probe(struct pci_dev *pcidev, static int c2_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
const struct pci_device_id *ent)
{ {
int ret = 0, i; int ret = 0, i;
unsigned long reg0_start, reg0_flags, reg0_len; unsigned long reg0_start, reg0_flags, reg0_len;
...@@ -1191,7 +1190,7 @@ static int __devinit c2_probe(struct pci_dev *pcidev, ...@@ -1191,7 +1190,7 @@ static int __devinit c2_probe(struct pci_dev *pcidev,
return ret; return ret;
} }
static void __devexit c2_remove(struct pci_dev *pcidev) static void c2_remove(struct pci_dev *pcidev)
{ {
struct c2_dev *c2dev = pci_get_drvdata(pcidev); struct c2_dev *c2dev = pci_get_drvdata(pcidev);
struct net_device *netdev = c2dev->netdev; struct net_device *netdev = c2dev->netdev;
...@@ -1236,7 +1235,7 @@ static struct pci_driver c2_pci_driver = { ...@@ -1236,7 +1235,7 @@ static struct pci_driver c2_pci_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.id_table = c2_pci_table, .id_table = c2_pci_table,
.probe = c2_probe, .probe = c2_probe,
.remove = __devexit_p(c2_remove), .remove = c2_remove,
}; };
static int __init c2_init_module(void) static int __init c2_init_module(void)
......
...@@ -498,16 +498,16 @@ extern int c2_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, ...@@ -498,16 +498,16 @@ extern int c2_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
struct ib_send_wr **bad_wr); struct ib_send_wr **bad_wr);
extern int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr, extern int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr,
struct ib_recv_wr **bad_wr); struct ib_recv_wr **bad_wr);
extern void __devinit c2_init_qp_table(struct c2_dev *c2dev); extern void c2_init_qp_table(struct c2_dev *c2dev);
extern void __devexit c2_cleanup_qp_table(struct c2_dev *c2dev); extern void c2_cleanup_qp_table(struct c2_dev *c2dev);
extern void c2_set_qp_state(struct c2_qp *, int); extern void c2_set_qp_state(struct c2_qp *, int);
extern struct c2_qp *c2_find_qpn(struct c2_dev *c2dev, int qpn); extern struct c2_qp *c2_find_qpn(struct c2_dev *c2dev, int qpn);
/* PDs */ /* PDs */
extern int c2_pd_alloc(struct c2_dev *c2dev, int privileged, struct c2_pd *pd); extern int c2_pd_alloc(struct c2_dev *c2dev, int privileged, struct c2_pd *pd);
extern void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd); extern void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd);
extern int __devinit c2_init_pd_table(struct c2_dev *c2dev); extern int c2_init_pd_table(struct c2_dev *c2dev);
extern void __devexit c2_cleanup_pd_table(struct c2_dev *c2dev); extern void c2_cleanup_pd_table(struct c2_dev *c2dev);
/* CQs */ /* CQs */
extern int c2_init_cq(struct c2_dev *c2dev, int entries, extern int c2_init_cq(struct c2_dev *c2dev, int entries,
......
...@@ -70,7 +70,7 @@ void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd) ...@@ -70,7 +70,7 @@ void c2_pd_free(struct c2_dev *c2dev, struct c2_pd *pd)
spin_unlock(&c2dev->pd_table.lock); spin_unlock(&c2dev->pd_table.lock);
} }
int __devinit c2_init_pd_table(struct c2_dev *c2dev) int c2_init_pd_table(struct c2_dev *c2dev)
{ {
c2dev->pd_table.last = 0; c2dev->pd_table.last = 0;
...@@ -84,7 +84,7 @@ int __devinit c2_init_pd_table(struct c2_dev *c2dev) ...@@ -84,7 +84,7 @@ int __devinit c2_init_pd_table(struct c2_dev *c2dev)
return 0; return 0;
} }
void __devexit c2_cleanup_pd_table(struct c2_dev *c2dev) void c2_cleanup_pd_table(struct c2_dev *c2dev)
{ {
kfree(c2dev->pd_table.table); kfree(c2dev->pd_table.table);
} }
...@@ -1010,13 +1010,13 @@ int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr, ...@@ -1010,13 +1010,13 @@ int c2_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *ib_wr,
return err; return err;
} }
void __devinit c2_init_qp_table(struct c2_dev *c2dev) void c2_init_qp_table(struct c2_dev *c2dev)
{ {
spin_lock_init(&c2dev->qp_table.lock); spin_lock_init(&c2dev->qp_table.lock);
idr_init(&c2dev->qp_table.idr); idr_init(&c2dev->qp_table.idr);
} }
void __devexit c2_cleanup_qp_table(struct c2_dev *c2dev) void c2_cleanup_qp_table(struct c2_dev *c2dev)
{ {
idr_destroy(&c2dev->qp_table.idr); idr_destroy(&c2dev->qp_table.idr);
} }
...@@ -442,7 +442,7 @@ static int c2_rnic_close(struct c2_dev *c2dev) ...@@ -442,7 +442,7 @@ static int c2_rnic_close(struct c2_dev *c2dev)
* involves initializing the various limits and resource pools that * involves initializing the various limits and resource pools that
* comprise the RNIC instance. * comprise the RNIC instance.
*/ */
int __devinit c2_rnic_init(struct c2_dev *c2dev) int c2_rnic_init(struct c2_dev *c2dev)
{ {
int err; int err;
u32 qsize, msgsize; u32 qsize, msgsize;
...@@ -611,7 +611,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev) ...@@ -611,7 +611,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
/* /*
* Called by c2_remove to cleanup the RNIC resources. * Called by c2_remove to cleanup the RNIC resources.
*/ */
void __devexit c2_rnic_term(struct c2_dev *c2dev) void c2_rnic_term(struct c2_dev *c2dev)
{ {
/* Close the open adapter instance */ /* Close the open adapter instance */
......
...@@ -713,8 +713,8 @@ static struct attribute_group ehca_dev_attr_grp = { ...@@ -713,8 +713,8 @@ static struct attribute_group ehca_dev_attr_grp = {
.attrs = ehca_dev_attrs .attrs = ehca_dev_attrs
}; };
static int __devinit ehca_probe(struct platform_device *dev, static int ehca_probe(struct platform_device *dev,
const struct of_device_id *id) const struct of_device_id *id)
{ {
struct ehca_shca *shca; struct ehca_shca *shca;
const u64 *handle; const u64 *handle;
...@@ -879,7 +879,7 @@ static int __devinit ehca_probe(struct platform_device *dev, ...@@ -879,7 +879,7 @@ static int __devinit ehca_probe(struct platform_device *dev,
return -EINVAL; return -EINVAL;
} }
static int __devexit ehca_remove(struct platform_device *dev) static int ehca_remove(struct platform_device *dev)
{ {
struct ehca_shca *shca = dev_get_drvdata(&dev->dev); struct ehca_shca *shca = dev_get_drvdata(&dev->dev);
unsigned long flags; unsigned long flags;
......
...@@ -127,9 +127,8 @@ const char *ipath_ibcstatus_str[] = { ...@@ -127,9 +127,8 @@ const char *ipath_ibcstatus_str[] = {
"LTState1C", "LTState1D", "LTState1E", "LTState1F" "LTState1C", "LTState1D", "LTState1E", "LTState1F"
}; };
static void __devexit ipath_remove_one(struct pci_dev *); static void ipath_remove_one(struct pci_dev *);
static int __devinit ipath_init_one(struct pci_dev *, static int ipath_init_one(struct pci_dev *, const struct pci_device_id *);
const struct pci_device_id *);
/* Only needed for registration, nothing else needs this info */ /* Only needed for registration, nothing else needs this info */
#define PCI_VENDOR_ID_PATHSCALE 0x1fc1 #define PCI_VENDOR_ID_PATHSCALE 0x1fc1
...@@ -148,7 +147,7 @@ MODULE_DEVICE_TABLE(pci, ipath_pci_tbl); ...@@ -148,7 +147,7 @@ MODULE_DEVICE_TABLE(pci, ipath_pci_tbl);
static struct pci_driver ipath_driver = { static struct pci_driver ipath_driver = {
.name = IPATH_DRV_NAME, .name = IPATH_DRV_NAME,
.probe = ipath_init_one, .probe = ipath_init_one,
.remove = __devexit_p(ipath_remove_one), .remove = ipath_remove_one,
.id_table = ipath_pci_tbl, .id_table = ipath_pci_tbl,
.driver = { .driver = {
.groups = ipath_driver_attr_groups, .groups = ipath_driver_attr_groups,
...@@ -392,8 +391,7 @@ static void ipath_verify_pioperf(struct ipath_devdata *dd) ...@@ -392,8 +391,7 @@ static void ipath_verify_pioperf(struct ipath_devdata *dd)
static void cleanup_device(struct ipath_devdata *dd); static void cleanup_device(struct ipath_devdata *dd);
static int __devinit ipath_init_one(struct pci_dev *pdev, static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
const struct pci_device_id *ent)
{ {
int ret, len, j; int ret, len, j;
struct ipath_devdata *dd; struct ipath_devdata *dd;
...@@ -737,7 +735,7 @@ static void cleanup_device(struct ipath_devdata *dd) ...@@ -737,7 +735,7 @@ static void cleanup_device(struct ipath_devdata *dd)
kfree(tmp); kfree(tmp);
} }
static void __devexit ipath_remove_one(struct pci_dev *pdev) static void ipath_remove_one(struct pci_dev *pdev)
{ {
struct ipath_devdata *dd = pci_get_drvdata(pdev); struct ipath_devdata *dd = pci_get_drvdata(pdev);
......
...@@ -130,7 +130,7 @@ static int log_mtts_per_seg = ilog2(MTHCA_MTT_SEG_SIZE / 8); ...@@ -130,7 +130,7 @@ static int log_mtts_per_seg = ilog2(MTHCA_MTT_SEG_SIZE / 8);
module_param_named(log_mtts_per_seg, log_mtts_per_seg, int, 0444); module_param_named(log_mtts_per_seg, log_mtts_per_seg, int, 0444);
MODULE_PARM_DESC(log_mtts_per_seg, "Log2 number of MTT entries per segment (1-5)"); MODULE_PARM_DESC(log_mtts_per_seg, "Log2 number of MTT entries per segment (1-5)");
static char mthca_version[] __devinitdata = static char mthca_version[] =
DRV_NAME ": Mellanox InfiniBand HCA driver v" DRV_NAME ": Mellanox InfiniBand HCA driver v"
DRV_VERSION " (" DRV_RELDATE ")\n"; DRV_VERSION " (" DRV_RELDATE ")\n";
...@@ -1139,8 +1139,7 @@ int __mthca_restart_one(struct pci_dev *pdev) ...@@ -1139,8 +1139,7 @@ int __mthca_restart_one(struct pci_dev *pdev)
return __mthca_init_one(pdev, hca_type); return __mthca_init_one(pdev, hca_type);
} }
static int __devinit mthca_init_one(struct pci_dev *pdev, static int mthca_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
const struct pci_device_id *id)
{ {
int ret; int ret;
...@@ -1162,7 +1161,7 @@ static int __devinit mthca_init_one(struct pci_dev *pdev, ...@@ -1162,7 +1161,7 @@ static int __devinit mthca_init_one(struct pci_dev *pdev,
return ret; return ret;
} }
static void __devexit mthca_remove_one(struct pci_dev *pdev) static void mthca_remove_one(struct pci_dev *pdev)
{ {
mutex_lock(&mthca_device_mutex); mutex_lock(&mthca_device_mutex);
__mthca_remove_one(pdev); __mthca_remove_one(pdev);
...@@ -1199,7 +1198,7 @@ static struct pci_driver mthca_driver = { ...@@ -1199,7 +1198,7 @@ static struct pci_driver mthca_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.id_table = mthca_pci_table, .id_table = mthca_pci_table,
.probe = mthca_init_one, .probe = mthca_init_one,
.remove = __devexit_p(mthca_remove_one) .remove = mthca_remove_one,
}; };
static void __init __mthca_check_profile_val(const char *name, int *pval, static void __init __mthca_check_profile_val(const char *name, int *pval,
......
...@@ -444,7 +444,7 @@ static irqreturn_t nes_interrupt(int irq, void *dev_id) ...@@ -444,7 +444,7 @@ static irqreturn_t nes_interrupt(int irq, void *dev_id)
/** /**
* nes_probe - Device initialization * nes_probe - Device initialization
*/ */
static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) static int nes_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
{ {
struct net_device *netdev = NULL; struct net_device *netdev = NULL;
struct nes_device *nesdev = NULL; struct nes_device *nesdev = NULL;
...@@ -749,7 +749,7 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i ...@@ -749,7 +749,7 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
/** /**
* nes_remove - unload from kernel * nes_remove - unload from kernel
*/ */
static void __devexit nes_remove(struct pci_dev *pcidev) static void nes_remove(struct pci_dev *pcidev)
{ {
struct nes_device *nesdev = pci_get_drvdata(pcidev); struct nes_device *nesdev = pci_get_drvdata(pcidev);
struct net_device *netdev; struct net_device *netdev;
...@@ -810,7 +810,7 @@ static struct pci_driver nes_pci_driver = { ...@@ -810,7 +810,7 @@ static struct pci_driver nes_pci_driver = {
.name = DRV_NAME, .name = DRV_NAME,
.id_table = nes_pci_table, .id_table = nes_pci_table,
.probe = nes_probe, .probe = nes_probe,
.remove = __devexit_p(nes_remove), .remove = nes_remove,
}; };
static ssize_t nes_show_adapter(struct device_driver *ddp, char *buf) static ssize_t nes_show_adapter(struct device_driver *ddp, char *buf)
......
...@@ -1134,9 +1134,8 @@ void qib_disable_after_error(struct qib_devdata *dd) ...@@ -1134,9 +1134,8 @@ void qib_disable_after_error(struct qib_devdata *dd)
*dd->devstatusp |= QIB_STATUS_HWERROR; *dd->devstatusp |= QIB_STATUS_HWERROR;
} }
static void __devexit qib_remove_one(struct pci_dev *); static void qib_remove_one(struct pci_dev *);
static int __devinit qib_init_one(struct pci_dev *, static int qib_init_one(struct pci_dev *, const struct pci_device_id *);
const struct pci_device_id *);
#define DRIVER_LOAD_MSG "QLogic " QIB_DRV_NAME " loaded: " #define DRIVER_LOAD_MSG "QLogic " QIB_DRV_NAME " loaded: "
#define PFX QIB_DRV_NAME ": " #define PFX QIB_DRV_NAME ": "
...@@ -1153,7 +1152,7 @@ MODULE_DEVICE_TABLE(pci, qib_pci_tbl); ...@@ -1153,7 +1152,7 @@ MODULE_DEVICE_TABLE(pci, qib_pci_tbl);
struct pci_driver qib_driver = { struct pci_driver qib_driver = {
.name = QIB_DRV_NAME, .name = QIB_DRV_NAME,
.probe = qib_init_one, .probe = qib_init_one,
.remove = __devexit_p(qib_remove_one), .remove = qib_remove_one,
.id_table = qib_pci_tbl, .id_table = qib_pci_tbl,
.err_handler = &qib_pci_err_handler, .err_handler = &qib_pci_err_handler,
}; };
...@@ -1342,8 +1341,7 @@ static void qib_postinit_cleanup(struct qib_devdata *dd) ...@@ -1342,8 +1341,7 @@ static void qib_postinit_cleanup(struct qib_devdata *dd)
qib_free_devdata(dd); qib_free_devdata(dd);
} }
static int __devinit qib_init_one(struct pci_dev *pdev, static int qib_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
const struct pci_device_id *ent)
{ {
int ret, j, pidx, initfail; int ret, j, pidx, initfail;
struct qib_devdata *dd = NULL; struct qib_devdata *dd = NULL;
...@@ -1448,7 +1446,7 @@ static int __devinit qib_init_one(struct pci_dev *pdev, ...@@ -1448,7 +1446,7 @@ static int __devinit qib_init_one(struct pci_dev *pdev,
return ret; return ret;
} }
static void __devexit qib_remove_one(struct pci_dev *pdev) static void qib_remove_one(struct pci_dev *pdev)
{ {
struct qib_devdata *dd = pci_get_drvdata(pdev); struct qib_devdata *dd = pci_get_drvdata(pdev);
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment