diff options
Diffstat (limited to 'drivers/misc/cb710/core.c')
| -rw-r--r-- | drivers/misc/cb710/core.c | 18 | 
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c index efec4139c3f..fb397e7d1cc 100644 --- a/drivers/misc/cb710/core.c +++ b/drivers/misc/cb710/core.c @@ -30,10 +30,10 @@ void cb710_pci_update_config_reg(struct pci_dev *pdev,  EXPORT_SYMBOL_GPL(cb710_pci_update_config_reg);  /* Some magic writes based on Windows driver init code */ -static int __devinit cb710_pci_configure(struct pci_dev *pdev) +static int cb710_pci_configure(struct pci_dev *pdev)  {  	unsigned int devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0); -	struct pci_dev *pdev0 = pci_get_slot(pdev->bus, devfn); +	struct pci_dev *pdev0;  	u32 val;  	cb710_pci_update_config_reg(pdev, 0x48, @@ -43,6 +43,7 @@ static int __devinit cb710_pci_configure(struct pci_dev *pdev)  	if (val & 0x80000000)  		return 0; +	pdev0 = pci_get_slot(pdev->bus, devfn);  	if (!pdev0)  		return -ENODEV; @@ -95,7 +96,7 @@ static void cb710_release_slot(struct device *dev)  #endif  } -static int __devinit cb710_register_slot(struct cb710_chip *chip, +static int cb710_register_slot(struct cb710_chip *chip,  	unsigned slot_mask, unsigned io_offset, const char *name)  {  	int nr = chip->slots; @@ -175,11 +176,11 @@ static int cb710_suspend(struct pci_dev *pdev, pm_message_t state)  {  	struct cb710_chip *chip = pci_get_drvdata(pdev); -	free_irq(pdev->irq, chip); +	devm_free_irq(&pdev->dev, pdev->irq, chip);  	pci_save_state(pdev);  	pci_disable_device(pdev);  	if (state.event & PM_EVENT_SLEEP) -		pci_set_power_state(pdev, PCI_D3cold); +		pci_set_power_state(pdev, PCI_D3hot);  	return 0;  } @@ -200,7 +201,7 @@ static int cb710_resume(struct pci_dev *pdev)  #endif /* CONFIG_PM */ -static int __devinit cb710_probe(struct pci_dev *pdev, +static int cb710_probe(struct pci_dev *pdev,  	const struct pci_device_id *ent)  {  	struct cb710_chip *chip; @@ -244,6 +245,7 @@ static int __devinit cb710_probe(struct pci_dev *pdev,  	if (err)  		return err; +	spin_lock_init(&chip->irq_lock);  	chip->pdev = pdev;  	chip->iobase = pcim_iomap_table(pdev)[0]; @@ -303,7 +305,7 @@ unreg_mmc:  	return err;  } -static void __devexit cb710_remove_one(struct pci_dev *pdev) +static void cb710_remove_one(struct pci_dev *pdev)  {  	struct cb710_chip *chip = pci_get_drvdata(pdev);  	unsigned long flags; @@ -330,7 +332,7 @@ static struct pci_driver cb710_driver = {  	.name = KBUILD_MODNAME,  	.id_table = cb710_pci_tbl,  	.probe = cb710_probe, -	.remove = __devexit_p(cb710_remove_one), +	.remove = cb710_remove_one,  #ifdef CONFIG_PM  	.suspend = cb710_suspend,  	.resume = cb710_resume,  | 
