提交 2015d192 编写于 作者: G Gertjan van Wingerde 提交者: John W. Linville

rt2x00: Move interface type assignments to generic code.

Make sure all drivers can benefit of the assignment of the interface
type of an adapter, instead of keeping it for rt2800 only.
Signed-off-by: NGertjan van Wingerde <gwingerde@gmail.com>
Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
Acked-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 f9ef6028
......@@ -1465,8 +1465,6 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
rt2x00dev->priv = (void *)&rt2800pci_rt2800_ops;
/*
......
......@@ -1074,8 +1074,6 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
{
int retval;
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_USB);
rt2x00dev->priv = (void *)&rt2800usb_rt2800_ops;
/*
......
......@@ -310,6 +310,8 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
rt2x00dev->irq = pci_dev->irq;
rt2x00dev->name = pci_name(pci_dev);
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
/*
* Determine RT chipset by reading PCI header.
*/
......
......@@ -93,6 +93,11 @@ int rt2x00soc_probe(struct platform_device *pdev,
rt2x00dev->irq = platform_get_irq(pdev, 0);
rt2x00dev->name = pdev->dev.driver->name;
/*
* SoC devices mimic PCI behavior.
*/
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
rt2x00_set_chip_rt(rt2x00dev, chipset);
retval = rt2x00soc_alloc_reg(rt2x00dev);
......
......@@ -653,6 +653,8 @@ int rt2x00usb_probe(struct usb_interface *usb_intf,
rt2x00dev->ops = ops;
rt2x00dev->hw = hw;
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_USB);
retval = rt2x00usb_alloc_reg(rt2x00dev);
if (retval)
goto exit_free_device;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册