提交 15b370c9 编写于 作者: P Pat Gefre 提交者: Linus Torvalds

[PATCH] Altix: more ioc3 cleanups and locking fixes

Some "inline" removing that Andrew suggested, removed some locking on
add/remove at this level - we'll let the callees decide.
Signed-off-by: NPatrick Gefre <pfg@sgi.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9cff3372
......@@ -62,7 +62,7 @@ static int nic_reset(struct ioc3_driver_data *idd)
return presence;
}
static inline int nic_read_bit(struct ioc3_driver_data *idd)
static int nic_read_bit(struct ioc3_driver_data *idd)
{
int result;
unsigned long flags;
......@@ -77,7 +77,7 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
return result;
}
static inline void nic_write_bit(struct ioc3_driver_data *idd, int bit)
static void nic_write_bit(struct ioc3_driver_data *idd, int bit)
{
if (bit)
writel(mcr_pack(6, 110), &idd->vma->mcr);
......@@ -371,8 +371,7 @@ static void probe_nic(struct ioc3_driver_data *idd)
/* Interrupts */
static inline void
write_ireg(struct ioc3_driver_data *idd, uint32_t val, int which)
static void write_ireg(struct ioc3_driver_data *idd, uint32_t val, int which)
{
unsigned long flags;
......@@ -735,14 +734,12 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
}
/* Add this IOC3 to all submodules */
read_lock(&ioc3_submodules_lock);
for(id=0;id<IOC3_MAX_SUBMODULES;id++)
if(ioc3_submodules[id] && ioc3_submodules[id]->probe) {
idd->active[id] = 1;
idd->active[id] = !ioc3_submodules[id]->probe
(ioc3_submodules[id], idd);
}
read_unlock(&ioc3_submodules_lock);
printk(KERN_INFO "IOC3 Master Driver loaded for %s\n", pci_name(pdev));
......@@ -767,7 +764,6 @@ static void ioc3_remove(struct pci_dev *pdev)
idd = pci_get_drvdata(pdev);
/* Remove this IOC3 from all submodules */
read_lock(&ioc3_submodules_lock);
for(id=0;id<IOC3_MAX_SUBMODULES;id++)
if(idd->active[id]) {
if(ioc3_submodules[id] && ioc3_submodules[id]->remove)
......@@ -781,7 +777,6 @@ static void ioc3_remove(struct pci_dev *pdev)
pci_name(pdev));
idd->active[id] = 0;
}
read_unlock(&ioc3_submodules_lock);
/* Clear and disable all IRQs */
write_ireg(idd, ~0, IOC3_W_IEC);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册