Commit 06675e6f4fb00a63575f4b85da305c3ab19e6e5d

Authored by Atsushi Nemoto
Committed by Ralf Baechle
1 parent 0487de9142

tc35815: Use irq number for tc35815-mac platform device id

The tc35815-mac platform device used a pci bus number and a devfn to
identify its target device, but the pci bus number may vary if some
bus-bridges are found.  Use irq number which is be unique for embedded
controllers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff

arch/mips/tx4938/toshiba_rbtx4938/setup.c
... ... @@ -598,8 +598,8 @@
598 598 printk(KERN_WARNING "seeprom: bad checksum.\n");
599 599 }
600 600 for (i = 0; i < 2; i++) {
601   - unsigned int slot = TX4938_PCIC_IDSEL_AD_TO_SLOT(31 - i);
602   - unsigned int id = (1 << 8) | PCI_DEVFN(slot, 0); /* bus 1 */
  601 + unsigned int id =
  602 + TXX9_IRQ_BASE + (i ? TX4938_IR_ETH1 : TX4938_IR_ETH0);
603 603 struct platform_device *pdev;
604 604 if (!(tx4938_ccfgptr->pcfg &
605 605 (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL)))
drivers/net/tc35815.c
... ... @@ -611,7 +611,7 @@
611 611 {
612 612 struct platform_device *plat_dev = to_platform_device(dev);
613 613 struct pci_dev *pci_dev = data;
614   - unsigned int id = (pci_dev->bus->number << 8) | pci_dev->devfn;
  614 + unsigned int id = pci_dev->irq;
615 615 return !strcmp(plat_dev->name, "tc35815-mac") && plat_dev->id == id;
616 616 }
617 617