Commit 98cc783f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

PCI: fix up probe functions for synclink drivers

  
Can not be marked __init, must be marked __devinit or not at all.
If it is marked __init, then oops can happen by a user writing to the
"new_id" file from sysfs.
parent d93bc786
......@@ -8020,8 +8020,8 @@ int mgsl_sppp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
#endif /* ifdef CONFIG_SYNCLINK_SYNCPPP */
static int __init synclink_init_one (struct pci_dev *dev,
const struct pci_device_id *ent)
static int __devinit synclink_init_one (struct pci_dev *dev,
const struct pci_device_id *ent)
{
struct mgsl_struct *info;
......
......@@ -5451,8 +5451,8 @@ void write_control_reg(SLMP_INFO * info)
}
static int __init synclinkmp_init_one (struct pci_dev *dev,
const struct pci_device_id *ent)
static int __devinit synclinkmp_init_one (struct pci_dev *dev,
const struct pci_device_id *ent)
{
if (pci_enable_device(dev)) {
printk("error enabling pci device %p\n", dev);
......
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