Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=06675e6f4fb00a63575f4b85da305c3ab19e6e5d
Commit:     06675e6f4fb00a63575f4b85da305c3ab19e6e5d
Parent:     0487de91427925e7c43debeb948bdf53b10ef32c
Author:     Atsushi Nemoto <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 19 01:15:52 2008 +0900
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Jan 22 00:35:23 2008 +0000

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/tx4938/toshiba_rbtx4938/setup.c |    4 ++--
 drivers/net/tc35815.c                     |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c 
b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
index 4a81523..632e5d2 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
@@ -598,8 +598,8 @@ static int __init rbtx4938_ethaddr_init(void)
                        printk(KERN_WARNING "seeprom: bad checksum.\n");
        }
        for (i = 0; i < 2; i++) {
-               unsigned int slot = TX4938_PCIC_IDSEL_AD_TO_SLOT(31 - i);
-               unsigned int id = (1 << 8) | PCI_DEVFN(slot, 0); /* bus 1 */
+               unsigned int id =
+                       TXX9_IRQ_BASE + (i ? TX4938_IR_ETH1 : TX4938_IR_ETH0);
                struct platform_device *pdev;
                if (!(tx4938_ccfgptr->pcfg &
                      (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL)))
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index d887c05..370d329 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -611,7 +611,7 @@ static int __devinit tc35815_mac_match(struct device *dev, 
void *data)
 {
        struct platform_device *plat_dev = to_platform_device(dev);
        struct pci_dev *pci_dev = data;
-       unsigned int id = (pci_dev->bus->number << 8) | pci_dev->devfn;
+       unsigned int id = pci_dev->irq;
        return !strcmp(plat_dev->name, "tc35815-mac") && plat_dev->id == id;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to