Lines Matching refs:rt2x00dev
36 static void rt2x00soc_free_reg(struct rt2x00_dev *rt2x00dev)
38 kfree(rt2x00dev->rf);
39 rt2x00dev->rf = NULL;
41 kfree(rt2x00dev->eeprom);
42 rt2x00dev->eeprom = NULL;
45 static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
47 struct platform_device *pdev = to_platform_device(rt2x00dev->dev);
54 rt2x00dev->csr.base = (void __iomem *)KSEG1ADDR(res->start);
55 if (!rt2x00dev->csr.base)
58 rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL);
59 if (!rt2x00dev->eeprom)
62 rt2x00dev->rf = kzalloc(rt2x00dev->ops->rf_size, GFP_KERNEL);
63 if (!rt2x00dev->rf)
70 rt2x00soc_free_reg(rt2x00dev);
78 struct rt2x00_dev *rt2x00dev;
89 rt2x00dev = hw->priv;
90 rt2x00dev->dev = &pdev->dev;
91 rt2x00dev->ops = ops;
92 rt2x00dev->hw = hw;
93 rt2x00dev->irq = platform_get_irq(pdev, 0);
94 rt2x00dev->name = pdev->dev.driver->name;
96 rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC);
98 retval = rt2x00soc_alloc_reg(rt2x00dev);
102 retval = rt2x00lib_probe_dev(rt2x00dev);
109 rt2x00soc_free_reg(rt2x00dev);
121 struct rt2x00_dev *rt2x00dev = hw->priv;
126 rt2x00lib_remove_dev(rt2x00dev);
127 rt2x00soc_free_reg(rt2x00dev);
138 struct rt2x00_dev *rt2x00dev = hw->priv;
140 return rt2x00lib_suspend(rt2x00dev, state);
147 struct rt2x00_dev *rt2x00dev = hw->priv;
149 return rt2x00lib_resume(rt2x00dev);