diff --git a/[refs] b/[refs] index 750e29033d5f..74569ecf1ead 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 960b8466548c9bc6f718b5f470c1a58000fab09d +refs/heads/master: 8279dd748f9704b811e528b31304e2fab026abc5 diff --git a/trunk/arch/arm/kernel/armksyms.c b/trunk/arch/arm/kernel/armksyms.c index 835d450797a1..b713c44c6fb4 100644 --- a/trunk/arch/arm/kernel/armksyms.c +++ b/trunk/arch/arm/kernel/armksyms.c @@ -41,10 +41,7 @@ extern void fp_enter(void); * This has a special calling convention; it doesn't * modify any of the usual registers, except for LR. */ -#define EXPORT_CRC_ALIAS(sym) __CRC_SYMBOL(sym, "") - #define EXPORT_SYMBOL_ALIAS(sym,orig) \ - EXPORT_CRC_ALIAS(sym) \ const struct kernel_symbol __ksymtab_##sym \ __attribute__((section("__ksymtab"))) = \ { (unsigned long)&orig, #sym }; diff --git a/trunk/arch/arm/mach-ixp4xx/common-pci.c b/trunk/arch/arm/mach-ixp4xx/common-pci.c index 2b544363c078..aa92e3708838 100644 --- a/trunk/arch/arm/mach-ixp4xx/common-pci.c +++ b/trunk/arch/arm/mach-ixp4xx/common-pci.c @@ -453,8 +453,8 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys) local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); res[0].name = "PCI I/O Space"; - res[0].start = 0x00000000; - res[0].end = 0x0000ffff; + res[0].start = 0x00001000; + res[0].end = 0xffff0000; res[0].flags = IORESOURCE_IO; res[1].name = "PCI Memory Space"; diff --git a/trunk/arch/arm/mach-ixp4xx/coyote-setup.c b/trunk/arch/arm/mach-ixp4xx/coyote-setup.c index 4ff4393ef0ea..c6335f51907d 100644 --- a/trunk/arch/arm/mach-ixp4xx/coyote-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/coyote-setup.c @@ -56,24 +56,21 @@ static struct resource coyote_uart_resource = { .flags = IORESOURCE_MEM, }; -static struct plat_serial8250_port coyote_uart_data[] = { - { - .mapbase = IXP4XX_UART2_BASE_PHYS, - .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, - .irq = IRQ_IXP4XX_UART2, - .flags = UPF_BOOT_AUTOCONF, - .iotype = UPIO_MEM, - .regshift = 2, - .uartclk = IXP4XX_UART_XTAL, - }, - { }, +static struct plat_serial8250_port coyote_uart_data = { + .mapbase = IXP4XX_UART2_BASE_PHYS, + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART2, + .flags = UPF_BOOT_AUTOCONF, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, }; static struct platform_device coyote_uart = { .name = "serial8250", .id = 0, .dev = { - .platform_data = coyote_uart_data, + .platform_data = &coyote_uart_data, }, .num_resources = 1, .resource = &coyote_uart_resource, @@ -90,10 +87,10 @@ static void __init coyote_init(void) *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; if (machine_is_ixdpg425()) { - coyote_uart_data[0].membase = + coyote_uart_data.membase = (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET); - coyote_uart_data[0].mapbase = IXP4XX_UART1_BASE_PHYS; - coyote_uart_data[0].irq = IRQ_IXP4XX_UART1; + coyote_uart_data.mapbase = IXP4XX_UART1_BASE_PHYS; + coyote_uart_data.irq = IRQ_IXP4XX_UART1; } diff --git a/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c b/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c index c2ba759e9946..f2e9c0ea0501 100644 --- a/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c @@ -95,8 +95,7 @@ static struct plat_serial8250_port ixdp425_uart_data[] = { .iotype = UPIO_MEM, .regshift = 2, .uartclk = IXP4XX_UART_XTAL, - }, - { }, + } }; static struct platform_device ixdp425_uart = { diff --git a/trunk/arch/arm/mm/proc-v6.S b/trunk/arch/arm/mm/proc-v6.S index 352db98ee269..e3d8510f4340 100644 --- a/trunk/arch/arm/mm/proc-v6.S +++ b/trunk/arch/arm/mm/proc-v6.S @@ -200,7 +200,7 @@ __v6_setup: mcr p15, 0, r4, c2, c0, 1 @ load TTB1 #ifdef CONFIG_VFP mrc p15, 0, r0, c1, c0, 2 - orr r0, r0, #(0xf << 20) + orr r0, r0, #(3 << 20) mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP #endif mrc p15, 0, r0, c1, c0, 0 @ read control register diff --git a/trunk/arch/ppc/syslib/of_device.c b/trunk/arch/ppc/syslib/of_device.c index 1eb4f726ca9f..49c0e34e2d6b 100644 --- a/trunk/arch/ppc/syslib/of_device.c +++ b/trunk/arch/ppc/syslib/of_device.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include @@ -16,20 +15,20 @@ * Used by a driver to check whether an of_device present in the * system is in its list of supported devices. */ -const struct of_device_id * of_match_device(const struct of_device_id *matches, +const struct of_match * of_match_device(const struct of_match *matches, const struct of_device *dev) { if (!dev->node) return NULL; - while (matches->name[0] || matches->type[0] || matches->compatible[0]) { + while (matches->name || matches->type || matches->compatible) { int match = 1; - if (matches->name[0]) + if (matches->name && matches->name != OF_ANY_MATCH) match &= dev->node->name && !strcmp(matches->name, dev->node->name); - if (matches->type[0]) + if (matches->type && matches->type != OF_ANY_MATCH) match &= dev->node->type && !strcmp(matches->type, dev->node->type); - if (matches->compatible[0]) + if (matches->compatible && matches->compatible != OF_ANY_MATCH) match &= device_is_compatible(dev->node, matches->compatible); if (match) @@ -43,7 +42,7 @@ static int of_platform_bus_match(struct device *dev, struct device_driver *drv) { struct of_device * of_dev = to_of_device(dev); struct of_platform_driver * of_drv = to_of_platform_driver(drv); - const struct of_device_id * matches = of_drv->match_table; + const struct of_match * matches = of_drv->match_table; if (!matches) return 0; @@ -76,7 +75,7 @@ static int of_device_probe(struct device *dev) int error = -ENODEV; struct of_platform_driver *drv; struct of_device *of_dev; - const struct of_device_id *match; + const struct of_match *match; drv = to_of_platform_driver(dev->driver); of_dev = to_of_device(dev); diff --git a/trunk/arch/ppc64/kernel/of_device.c b/trunk/arch/ppc64/kernel/of_device.c index b80e81984ba8..66bd5ab7c25a 100644 --- a/trunk/arch/ppc64/kernel/of_device.c +++ b/trunk/arch/ppc64/kernel/of_device.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include @@ -16,20 +15,20 @@ * Used by a driver to check whether an of_device present in the * system is in its list of supported devices. */ -const struct of_device_id *of_match_device(const struct of_device_id *matches, +const struct of_match * of_match_device(const struct of_match *matches, const struct of_device *dev) { if (!dev->node) return NULL; - while (matches->name[0] || matches->type[0] || matches->compatible[0]) { + while (matches->name || matches->type || matches->compatible) { int match = 1; - if (matches->name[0]) + if (matches->name && matches->name != OF_ANY_MATCH) match &= dev->node->name && !strcmp(matches->name, dev->node->name); - if (matches->type[0]) + if (matches->type && matches->type != OF_ANY_MATCH) match &= dev->node->type && !strcmp(matches->type, dev->node->type); - if (matches->compatible[0]) + if (matches->compatible && matches->compatible != OF_ANY_MATCH) match &= device_is_compatible(dev->node, matches->compatible); if (match) @@ -43,7 +42,7 @@ static int of_platform_bus_match(struct device *dev, struct device_driver *drv) { struct of_device * of_dev = to_of_device(dev); struct of_platform_driver * of_drv = to_of_platform_driver(drv); - const struct of_device_id * matches = of_drv->match_table; + const struct of_match * matches = of_drv->match_table; if (!matches) return 0; @@ -76,7 +75,7 @@ static int of_device_probe(struct device *dev) int error = -ENODEV; struct of_platform_driver *drv; struct of_device *of_dev; - const struct of_device_id *match; + const struct of_match *match; drv = to_of_platform_driver(dev->driver); of_dev = to_of_device(dev); diff --git a/trunk/crypto/cipher.c b/trunk/crypto/cipher.c index f434ce7c2d0b..69264497b48c 100644 --- a/trunk/crypto/cipher.c +++ b/trunk/crypto/cipher.c @@ -336,6 +336,5 @@ int crypto_init_cipher_ops(struct crypto_tfm *tfm) void crypto_exit_cipher_ops(struct crypto_tfm *tfm) { - if (tfm->crt_cipher.cit_iv) - kfree(tfm->crt_cipher.cit_iv); + kfree(tfm->crt_cipher.cit_iv); } diff --git a/trunk/crypto/hmac.c b/trunk/crypto/hmac.c index 847df9263e16..da0456b37109 100644 --- a/trunk/crypto/hmac.c +++ b/trunk/crypto/hmac.c @@ -49,8 +49,7 @@ int crypto_alloc_hmac_block(struct crypto_tfm *tfm) void crypto_free_hmac_block(struct crypto_tfm *tfm) { - if (tfm->crt_digest.dit_hmac_block) - kfree(tfm->crt_digest.dit_hmac_block); + kfree(tfm->crt_digest.dit_hmac_block); } void crypto_hmac_init(struct crypto_tfm *tfm, u8 *key, unsigned int *keylen) diff --git a/trunk/drivers/i2c/busses/i2c-keywest.c b/trunk/drivers/i2c/busses/i2c-keywest.c index 94ae808314f7..363e545fc01f 100644 --- a/trunk/drivers/i2c/busses/i2c-keywest.c +++ b/trunk/drivers/i2c/busses/i2c-keywest.c @@ -698,7 +698,7 @@ dispose_iface(struct device *dev) } static int -create_iface_macio(struct macio_dev* dev, const struct of_device_id *match) +create_iface_macio(struct macio_dev* dev, const struct of_match *match) { return create_iface(dev->ofdev.node, &dev->ofdev.dev); } @@ -710,7 +710,7 @@ dispose_iface_macio(struct macio_dev* dev) } static int -create_iface_of_platform(struct of_device* dev, const struct of_device_id *match) +create_iface_of_platform(struct of_device* dev, const struct of_match *match) { return create_iface(dev->node, &dev->dev); } @@ -721,9 +721,10 @@ dispose_iface_of_platform(struct of_device* dev) return dispose_iface(&dev->dev); } -static struct of_device_id i2c_keywest_match[] = +static struct of_match i2c_keywest_match[] = { { + .name = OF_ANY_MATCH, .type = "i2c", .compatible = "keywest" }, diff --git a/trunk/drivers/ide/ppc/pmac.c b/trunk/drivers/ide/ppc/pmac.c index be0fcc8f4b15..818380b5fd27 100644 --- a/trunk/drivers/ide/ppc/pmac.c +++ b/trunk/drivers/ide/ppc/pmac.c @@ -1419,7 +1419,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) * Attach to a macio probed interface */ static int __devinit -pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) +pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_match *match) { void __iomem *base; unsigned long regbase; @@ -1637,19 +1637,27 @@ pmac_ide_pci_resume(struct pci_dev *pdev) return rc; } -static struct of_device_id pmac_ide_macio_match[] = +static struct of_match pmac_ide_macio_match[] = { { .name = "IDE", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH }, { .name = "ATA", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH }, { + .name = OF_ANY_MATCH, .type = "ide", + .compatible = OF_ANY_MATCH }, { + .name = OF_ANY_MATCH, .type = "ata", + .compatible = OF_ANY_MATCH }, {}, }; diff --git a/trunk/drivers/ieee1394/ieee1394_core.h b/trunk/drivers/ieee1394/ieee1394_core.h index 0b31429d0a68..73bd8efd2b6c 100644 --- a/trunk/drivers/ieee1394/ieee1394_core.h +++ b/trunk/drivers/ieee1394/ieee1394_core.h @@ -38,8 +38,8 @@ struct hpsb_packet { /* These are core internal. */ signed char tlabel; - signed char ack_code; - unsigned char tcode; + char ack_code; + char tcode; unsigned expect_response:1; unsigned no_waiter:1; diff --git a/trunk/drivers/macintosh/Makefile b/trunk/drivers/macintosh/Makefile index 236291bd48a4..f5ae171dbfef 100644 --- a/trunk/drivers/macintosh/Makefile +++ b/trunk/drivers/macintosh/Makefile @@ -4,7 +4,7 @@ # Each configuration option enables a list of files. -obj-$(CONFIG_PPC_PMAC) += macio_asic.o macio_sysfs.o +obj-$(CONFIG_PPC_PMAC) += macio_asic.o obj-$(CONFIG_PMAC_MEDIABAY) += mediabay.o obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o diff --git a/trunk/drivers/macintosh/macio_asic.c b/trunk/drivers/macintosh/macio_asic.c index 1ee003346923..d0bda7e3e6aa 100644 --- a/trunk/drivers/macintosh/macio_asic.c +++ b/trunk/drivers/macintosh/macio_asic.c @@ -33,7 +33,7 @@ static int macio_bus_match(struct device *dev, struct device_driver *drv) { struct macio_dev * macio_dev = to_macio_device(dev); struct macio_driver * macio_drv = to_macio_driver(drv); - const struct of_device_id * matches = macio_drv->match_table; + const struct of_match * matches = macio_drv->match_table; if (!matches) return 0; @@ -66,7 +66,7 @@ static int macio_device_probe(struct device *dev) int error = -ENODEV; struct macio_driver *drv; struct macio_dev *macio_dev; - const struct of_device_id *match; + const struct of_match *match; drv = to_macio_driver(dev->driver); macio_dev = to_macio_device(dev); @@ -126,85 +126,11 @@ static int macio_device_resume(struct device * dev) return 0; } -static int macio_hotplug (struct device *dev, char **envp, int num_envp, - char *buffer, int buffer_size) -{ - struct macio_dev * macio_dev; - struct of_device * of; - char *scratch, *compat; - int i = 0; - int length = 0; - int cplen, seen = 0; - - if (!dev) - return -ENODEV; - - macio_dev = to_macio_device(dev); - if (!macio_dev) - return -ENODEV; - - of = &macio_dev->ofdev; - scratch = buffer; - - /* stuff we want to pass to /sbin/hotplug */ - envp[i++] = scratch; - length += scnprintf (scratch, buffer_size - length, "OF_NAME=%s", - of->node->name); - if ((buffer_size - length <= 0) || (i >= num_envp)) - return -ENOMEM; - ++length; - scratch += length; - - envp[i++] = scratch; - length += scnprintf (scratch, buffer_size - length, "OF_TYPE=%s", - of->node->type); - if ((buffer_size - length <= 0) || (i >= num_envp)) - return -ENOMEM; - ++length; - scratch += length; - - /* Since the compatible field can contain pretty much anything - * it's not really legal to split it out with commas. We split it - * up using a number of environment variables instead. */ - - compat = (char *) get_property(of->node, "compatible", &cplen); - while (compat && cplen > 0) { - int l; - envp[i++] = scratch; - length += scnprintf (scratch, buffer_size - length, - "OF_COMPATIBLE_%d=%s", seen, compat); - if ((buffer_size - length <= 0) || (i >= num_envp)) - return -ENOMEM; - length++; - scratch += length; - l = strlen (compat) + 1; - compat += l; - cplen -= l; - seen++; - } - - envp[i++] = scratch; - length += scnprintf (scratch, buffer_size - length, - "OF_COMPATIBLE_N=%d", seen); - if ((buffer_size - length <= 0) || (i >= num_envp)) - return -ENOMEM; - ++length; - scratch += length; - - envp[i] = NULL; - - return 0; -} - -extern struct device_attribute macio_dev_attrs[]; - struct bus_type macio_bus_type = { .name = "macio", .match = macio_bus_match, - .hotplug = macio_hotplug, .suspend = macio_device_suspend, .resume = macio_device_resume, - .dev_attrs = macio_dev_attrs, }; static int __init macio_bus_driver_init(void) diff --git a/trunk/drivers/macintosh/macio_sysfs.c b/trunk/drivers/macintosh/macio_sysfs.c deleted file mode 100644 index 97d22bb4516a..000000000000 --- a/trunk/drivers/macintosh/macio_sysfs.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include -#include -#include - - -#define macio_config_of_attr(field, format_string) \ -static ssize_t \ -field##_show (struct device *dev, struct device_attribute *attr, \ - char *buf) \ -{ \ - struct macio_dev *mdev = to_macio_device (dev); \ - return sprintf (buf, format_string, mdev->ofdev.node->field); \ -} - -static ssize_t -compatible_show (struct device *dev, struct device_attribute *attr, char *buf) -{ - struct of_device *of; - char *compat; - int cplen; - int length = 0; - - of = &to_macio_device (dev)->ofdev; - compat = (char *) get_property(of->node, "compatible", &cplen); - if (!compat) { - *buf = '\0'; - return 0; - } - while (cplen > 0) { - int l; - length += sprintf (buf, "%s\n", compat); - buf += length; - l = strlen (compat) + 1; - compat += l; - cplen -= l; - } - - return length; -} - -macio_config_of_attr (name, "%s\n"); -macio_config_of_attr (type, "%s\n"); - -struct device_attribute macio_dev_attrs[] = { - __ATTR_RO(name), - __ATTR_RO(type), - __ATTR_RO(compatible), - __ATTR_NULL -}; diff --git a/trunk/drivers/macintosh/mediabay.c b/trunk/drivers/macintosh/mediabay.c index 7c16c25fc5d4..4be709e13eec 100644 --- a/trunk/drivers/macintosh/mediabay.c +++ b/trunk/drivers/macintosh/mediabay.c @@ -642,7 +642,7 @@ static int __pmac media_bay_task(void *x) } } -static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_device_id *match) +static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_match *match) { struct media_bay_info* bay; u32 __iomem *regbase; @@ -797,20 +797,23 @@ static struct mb_ops keylargo_mb_ops __pmacdata = { * Therefore we do it all by polling the media bay once each tick. */ -static struct of_device_id media_bay_match[] = +static struct of_match media_bay_match[] = { { .name = "media-bay", + .type = OF_ANY_MATCH, .compatible = "keylargo-media-bay", .data = &keylargo_mb_ops, }, { .name = "media-bay", + .type = OF_ANY_MATCH, .compatible = "heathrow-media-bay", .data = &heathrow_mb_ops, }, { .name = "media-bay", + .type = OF_ANY_MATCH, .compatible = "ohare-media-bay", .data = &ohare_mb_ops, }, diff --git a/trunk/drivers/macintosh/therm_pm72.c b/trunk/drivers/macintosh/therm_pm72.c index 703e31973314..feb4e2413858 100644 --- a/trunk/drivers/macintosh/therm_pm72.c +++ b/trunk/drivers/macintosh/therm_pm72.c @@ -120,7 +120,6 @@ #include #include #include -#include #include "therm_pm72.h" @@ -1987,7 +1986,7 @@ static void fcu_lookup_fans(struct device_node *fcu_node) } } -static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match) +static int fcu_of_probe(struct of_device* dev, const struct of_match *match) { int rc; @@ -2010,10 +2009,12 @@ static int fcu_of_remove(struct of_device* dev) return 0; } -static struct of_device_id fcu_match[] = +static struct of_match fcu_of_match[] = { { + .name = OF_ANY_MATCH, .type = "fcu", + .compatible = OF_ANY_MATCH }, {}, }; @@ -2021,7 +2022,7 @@ static struct of_device_id fcu_match[] = static struct of_platform_driver fcu_of_platform_driver = { .name = "temperature", - .match_table = fcu_match, + .match_table = fcu_of_match, .probe = fcu_of_probe, .remove = fcu_of_remove }; diff --git a/trunk/drivers/macintosh/therm_windtunnel.c b/trunk/drivers/macintosh/therm_windtunnel.c index cbb72eb0426d..61400f04015e 100644 --- a/trunk/drivers/macintosh/therm_windtunnel.c +++ b/trunk/drivers/macintosh/therm_windtunnel.c @@ -43,7 +43,6 @@ #include #include #include -#include #define LOG_TEMP 0 /* continously log temperature */ @@ -451,7 +450,7 @@ do_probe( struct i2c_adapter *adapter, int addr, int kind ) /************************************************************************/ static int -therm_of_probe( struct of_device *dev, const struct of_device_id *match ) +therm_of_probe( struct of_device *dev, const struct of_match *match ) { return i2c_add_driver( &g4fan_driver ); } @@ -462,8 +461,9 @@ therm_of_remove( struct of_device *dev ) return i2c_del_driver( &g4fan_driver ); } -static struct of_device_id therm_of_match[] = {{ +static struct of_match therm_of_match[] = {{ .name = "fan", + .type = OF_ANY_MATCH, .compatible = "adm1030" }, {} }; diff --git a/trunk/drivers/net/bmac.c b/trunk/drivers/net/bmac.c index 8dc657fc8afb..00e5257b176f 100644 --- a/trunk/drivers/net/bmac.c +++ b/trunk/drivers/net/bmac.c @@ -1261,7 +1261,7 @@ static void bmac_reset_and_enable(struct net_device *dev) spin_unlock_irqrestore(&bp->lock, flags); } -static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match) +static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_match *match) { int j, rev, ret; struct bmac_data *bp; @@ -1645,13 +1645,16 @@ static int __devexit bmac_remove(struct macio_dev *mdev) return 0; } -static struct of_device_id bmac_match[] = +static struct of_match bmac_match[] = { { .name = "bmac", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH, .data = (void *)0, }, { + .name = OF_ANY_MATCH, .type = "network", .compatible = "bmac+", .data = (void *)1, diff --git a/trunk/drivers/net/mace.c b/trunk/drivers/net/mace.c index 81d0a26e4f41..6ed2d7dbd44c 100644 --- a/trunk/drivers/net/mace.c +++ b/trunk/drivers/net/mace.c @@ -109,7 +109,7 @@ bitrev(int b) } -static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_id *match) +static int __devinit mace_probe(struct macio_dev *mdev, const struct of_match *match) { struct device_node *mace = macio_get_of_node(mdev); struct net_device *dev; @@ -1009,10 +1009,12 @@ static irqreturn_t mace_rxdma_intr(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } -static struct of_device_id mace_match[] = +static struct of_match mace_match[] = { { .name = "mace", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH }, {}, }; diff --git a/trunk/drivers/net/wireless/airport.c b/trunk/drivers/net/wireless/airport.c index 9d496703c465..b4f4bd7956a2 100644 --- a/trunk/drivers/net/wireless/airport.c +++ b/trunk/drivers/net/wireless/airport.c @@ -184,7 +184,7 @@ static int airport_hard_reset(struct orinoco_private *priv) } static int -airport_attach(struct macio_dev *mdev, const struct of_device_id *match) +airport_attach(struct macio_dev *mdev, const struct of_match *match) { struct orinoco_private *priv; struct net_device *dev; @@ -266,16 +266,16 @@ MODULE_AUTHOR("Benjamin Herrenschmidt "); MODULE_DESCRIPTION("Driver for the Apple Airport wireless card."); MODULE_LICENSE("Dual MPL/GPL"); -static struct of_device_id airport_match[] = +static struct of_match airport_match[] = { { .name = "radio", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH }, {}, }; -MODULE_DEVICE_TABLE (of, airport_match); - static struct macio_driver airport_driver = { .name = DRIVER_NAME, diff --git a/trunk/drivers/pci/setup-bus.c b/trunk/drivers/pci/setup-bus.c index 9fe48f712be9..c1bdfb424658 100644 --- a/trunk/drivers/pci/setup-bus.c +++ b/trunk/drivers/pci/setup-bus.c @@ -74,7 +74,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus) idx = res - &list->dev->resource[0]; if (pci_assign_resource(list->dev, idx)) { res->start = 0; - res->end = 0; res->flags = 0; } tmp = list; diff --git a/trunk/drivers/scsi/mac53c94.c b/trunk/drivers/scsi/mac53c94.c index 932dcf0366eb..edd47d1f0b17 100644 --- a/trunk/drivers/scsi/mac53c94.c +++ b/trunk/drivers/scsi/mac53c94.c @@ -424,7 +424,7 @@ static struct scsi_host_template mac53c94_template = { .use_clustering = DISABLE_CLUSTERING, }; -static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *match) +static int mac53c94_probe(struct macio_dev *mdev, const struct of_match *match) { struct device_node *node = macio_get_of_node(mdev); struct pci_dev *pdev = macio_get_pci_dev(mdev); @@ -544,14 +544,15 @@ static int mac53c94_remove(struct macio_dev *mdev) } -static struct of_device_id mac53c94_match[] = +static struct of_match mac53c94_match[] = { { .name = "53c94", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH }, {}, }; -MODULE_DEVICE_TABLE (of, mac53c94_match); static struct macio_driver mac53c94_driver = { diff --git a/trunk/drivers/scsi/mesh.c b/trunk/drivers/scsi/mesh.c index ff1933298da6..b05737ae5eff 100644 --- a/trunk/drivers/scsi/mesh.c +++ b/trunk/drivers/scsi/mesh.c @@ -1847,7 +1847,7 @@ static struct scsi_host_template mesh_template = { .use_clustering = DISABLE_CLUSTERING, }; -static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match) +static int mesh_probe(struct macio_dev *mdev, const struct of_match *match) { struct device_node *mesh = macio_get_of_node(mdev); struct pci_dev* pdev = macio_get_pci_dev(mdev); @@ -2012,18 +2012,20 @@ static int mesh_remove(struct macio_dev *mdev) } -static struct of_device_id mesh_match[] = +static struct of_match mesh_match[] = { { .name = "mesh", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH }, { + .name = OF_ANY_MATCH, .type = "scsi", .compatible = "chrp,mesh0" }, {}, }; -MODULE_DEVICE_TABLE (of, mesh_match); static struct macio_driver mesh_driver = { diff --git a/trunk/drivers/serial/pmac_zilog.c b/trunk/drivers/serial/pmac_zilog.c index 7db2f37532cf..1c9f71617123 100644 --- a/trunk/drivers/serial/pmac_zilog.c +++ b/trunk/drivers/serial/pmac_zilog.c @@ -1545,7 +1545,7 @@ static void pmz_dispose_port(struct uart_pmac_port *uap) /* * Called upon match with an escc node in the devive-tree. */ -static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match) +static int pmz_attach(struct macio_dev *mdev, const struct of_match *match) { int i; @@ -1850,17 +1850,20 @@ static int __init pmz_register(void) return rc; } -static struct of_device_id pmz_match[] = +static struct of_match pmz_match[] = { { .name = "ch-a", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH }, { .name = "ch-b", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH }, {}, }; -MODULE_DEVICE_TABLE (of, pmz_match); static struct macio_driver pmz_driver = { diff --git a/trunk/drivers/video/platinumfb.c b/trunk/drivers/video/platinumfb.c index b00887e9851c..3dd1de1539d2 100644 --- a/trunk/drivers/video/platinumfb.c +++ b/trunk/drivers/video/platinumfb.c @@ -523,7 +523,7 @@ int __init platinumfb_setup(char *options) #define invalidate_cache(addr) #endif -static int __devinit platinumfb_probe(struct of_device* odev, const struct of_device_id *match) +static int __devinit platinumfb_probe(struct of_device* odev, const struct of_match *match) { struct device_node *dp = odev->node; struct fb_info *info; @@ -647,10 +647,12 @@ static int __devexit platinumfb_remove(struct of_device* odev) return 0; } -static struct of_device_id platinumfb_match[] = +static struct of_match platinumfb_match[] = { { .name = "platinum", + .type = OF_ANY_MATCH, + .compatible = OF_ANY_MATCH, }, {}, }; diff --git a/trunk/include/asm-arm/arch-ixp4xx/io.h b/trunk/include/asm-arm/arch-ixp4xx/io.h index 7495026e2c18..c27b9d3079a7 100644 --- a/trunk/include/asm-arm/arch-ixp4xx/io.h +++ b/trunk/include/asm-arm/arch-ixp4xx/io.h @@ -3,7 +3,7 @@ * * Author: Deepak Saxena * - * Copyright (C) 2002-2005 MontaVista Software, Inc. + * Copyright (C) 2002-2004 MontaVista Software, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -383,180 +383,6 @@ __ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count) *vaddr++ = inl(io_addr); } -#define __is_io_address(p) (((unsigned long)p >= 0x0) && \ - ((unsigned long)p <= 0x0000ffff)) -static inline unsigned int -__ixp4xx_ioread8(void __iomem *port) -{ - if (__is_io_address(port)) - return (unsigned int)__ixp4xx_inb((unsigned int)port); - else -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - return (unsigned int)__raw_readb((u32)port); -#else - return (unsigned int)__ixp4xx_readb((u32)port); -#endif -} - -static inline void -__ixp4xx_ioread8_rep(u32 port, u8 *vaddr, u32 count) -{ - if (__is_io_address(port)) - __ixp4xx_insb(port, vaddr, count); - else -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_readsb((void __iomem *)port, vaddr, count); -#else - __ixp4xx_readsb(port, vaddr, count); -#endif -} - -static inline unsigned int -__ixp4xx_ioread16(void __iomem *port) -{ - if (__is_io_address(port)) - return (unsigned int)__ixp4xx_inw((unsigned int)port); - else -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - return le16_to_cpu(__raw_readw((u32)port)); -#else - return (unsigned int)__ixp4xx_readw((u32)port); -#endif -} - -static inline void -__ixp4xx_ioread16_rep(u32 port, u16 *vaddr, u32 count) -{ - if (__is_io_address(port)) - __ixp4xx_insw(port, vaddr, count); - else -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_readsw((void __iomem *)port, vaddr, count); -#else - __ixp4xx_readsw(port, vaddr, count); -#endif -} - -static inline unsigned int -__ixp4xx_ioread32(void __iomem *port) -{ - if (__is_io_address(port)) - return (unsigned int)__ixp4xx_inl((unsigned int)port); - else { -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - return le32_to_cpu(__raw_readl((u32)port)); -#else - return (unsigned int)__ixp4xx_readl((u32)port); -#endif - } -} - -static inline void -__ixp4xx_ioread32_rep(u32 port, u32 *vaddr, u32 count) -{ - if (__is_io_address(port)) - __ixp4xx_insl(port, vaddr, count); - else -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_readsl((void __iomem *)port, vaddr, count); -#else - __ixp4xx_readsl(port, vaddr, count); -#endif -} - -static inline void -__ixp4xx_iowrite8(u8 value, void __iomem *port) -{ - if (__is_io_address(port)) - __ixp4xx_outb(value, (unsigned int)port); - else -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_writeb(value, (u32)port); -#else - __ixp4xx_writeb(value, (u32)port); -#endif -} - -static inline void -__ixp4xx_iowrite8_rep(u32 port, u8 *vaddr, u32 count) -{ - if (__is_io_address(port)) - __ixp4xx_outsb(port, vaddr, count); -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_writesb((void __iomem *)port, vaddr, count); -#else - __ixp4xx_writesb(port, vaddr, count); -#endif -} - -static inline void -__ixp4xx_iowrite16(u16 value, void __iomem *port) -{ - if (__is_io_address(port)) - __ixp4xx_outw(value, (unsigned int)port); - else -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_writew(cpu_to_le16(value), (u32)port); -#else - __ixp4xx_writew(value, (u32)port); -#endif -} - -static inline void -__ixp4xx_iowrite16_rep(u32 port, u16 *vaddr, u32 count) -{ - if (__is_io_address(port)) - __ixp4xx_outsw(port, vaddr, count); -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_readsw((void __iomem *)port, vaddr, count); -#else - __ixp4xx_writesw(port, vaddr, count); -#endif -} - -static inline void -__ixp4xx_iowrite32(u32 value, void __iomem *port) -{ - if (__is_io_address(port)) - __ixp4xx_outl(value, (unsigned int)port); - else -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_writel(cpu_to_le32(value), (u32)port); -#else - __ixp4xx_writel(value, (u32)port); -#endif -} - -static inline void -__ixp4xx_iowrite32_rep(u32 port, u32 *vaddr, u32 count) -{ - if (__is_io_address(port)) - __ixp4xx_outsl(port, vaddr, count); -#ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_readsl((void __iomem *)port, vaddr, count); -#else - __ixp4xx_outsl(port, vaddr, count); -#endif -} - -#define ioread8(p) __ixp4xx_ioread8(p) -#define ioread16(p) __ixp4xx_ioread16(p) -#define ioread32(p) __ixp4xx_ioread32(p) - -#define ioread8_rep(p, v, c) __ixp4xx_ioread8_rep(p, v, c) -#define ioread16_rep(p, v, c) __ixp4xx_ioread16_rep(p, v, c) -#define ioread32_rep(p, v, c) __ixp4xx_ioread32_rep(p, v, c) - -#define iowrite8(v,p) __ixp4xx_iowrite8(v,p) -#define iowrite16(v,p) __ixp4xx_iowrite16(v,p) -#define iowrite32(v,p) __ixp4xx_iowrite32(v,p) - -#define iowrite8_rep(p, v, c) __ixp4xx_iowrite8_rep(p, v, c) -#define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c) -#define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c) - -#define ioport_map(port, nr) ((void __iomem*)port) -#define ioport_unmap(addr) #endif // __ASM_ARM_ARCH_IO_H diff --git a/trunk/include/asm-ppc/macio.h b/trunk/include/asm-ppc/macio.h index a481b772d154..2cafc9978607 100644 --- a/trunk/include/asm-ppc/macio.h +++ b/trunk/include/asm-ppc/macio.h @@ -1,7 +1,6 @@ #ifndef __MACIO_ASIC_H__ #define __MACIO_ASIC_H__ -#include #include extern struct bus_type macio_bus_type; @@ -121,10 +120,10 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev) struct macio_driver { char *name; - struct of_device_id *match_table; + struct of_match *match_table; struct module *owner; - int (*probe)(struct macio_dev* dev, const struct of_device_id *match); + int (*probe)(struct macio_dev* dev, const struct of_match *match); int (*remove)(struct macio_dev* dev); int (*suspend)(struct macio_dev* dev, pm_message_t state); diff --git a/trunk/include/asm-ppc/of_device.h b/trunk/include/asm-ppc/of_device.h index 4b264cfd3998..7229735a7c18 100644 --- a/trunk/include/asm-ppc/of_device.h +++ b/trunk/include/asm-ppc/of_device.h @@ -24,8 +24,20 @@ struct of_device }; #define to_of_device(d) container_of(d, struct of_device, dev) -extern const struct of_device_id *of_match_device( - const struct of_device_id *matches, const struct of_device *dev); +/* + * Struct used for matching a device + */ +struct of_match +{ + char *name; + char *type; + char *compatible; + void *data; +}; +#define OF_ANY_MATCH ((char *)-1L) + +extern const struct of_match *of_match_device( + const struct of_match *matches, const struct of_device *dev); extern struct of_device *of_dev_get(struct of_device *dev); extern void of_dev_put(struct of_device *dev); @@ -37,10 +49,10 @@ extern void of_dev_put(struct of_device *dev); struct of_platform_driver { char *name; - struct of_device_id *match_table; + struct of_match *match_table; struct module *owner; - int (*probe)(struct of_device* dev, const struct of_device_id *match); + int (*probe)(struct of_device* dev, const struct of_match *match); int (*remove)(struct of_device* dev); int (*suspend)(struct of_device* dev, pm_message_t state); diff --git a/trunk/include/linux/mod_devicetable.h b/trunk/include/linux/mod_devicetable.h index dce53ac1625d..9b6d05172ed4 100644 --- a/trunk/include/linux/mod_devicetable.h +++ b/trunk/include/linux/mod_devicetable.h @@ -174,17 +174,6 @@ struct serio_device_id { __u8 proto; }; -/* - * Struct used for matching a device - */ -struct of_device_id -{ - char name[32]; - char type[32]; - char compatible[128]; - void *data; -}; - /* PCMCIA */ diff --git a/trunk/mm/slab.c b/trunk/mm/slab.c index e57abd45eede..122d031baab2 100644 --- a/trunk/mm/slab.c +++ b/trunk/mm/slab.c @@ -2372,9 +2372,6 @@ void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid) struct slab *slabp; kmem_bufctl_t next; - if (nodeid == -1) - return kmem_cache_alloc(cachep, flags); - for (loop = 0;;loop++) { struct list_head *q; diff --git a/trunk/scripts/mod/file2alias.c b/trunk/scripts/mod/file2alias.c index 5180405c1a84..908bff6d1eef 100644 --- a/trunk/scripts/mod/file2alias.c +++ b/trunk/scripts/mod/file2alias.c @@ -25,8 +25,6 @@ typedef Elf64_Addr kernel_ulong_t; #include #endif -#include - typedef uint32_t __u32; typedef uint16_t __u16; typedef unsigned char __u8; @@ -325,22 +323,6 @@ static int do_pcmcia_entry(const char *filename, -static int do_of_entry (const char *filename, struct of_device_id *of, char *alias) -{ - char *tmp; - sprintf (alias, "of:N%sT%sC%s", - of->name[0] ? of->name : "*", - of->type[0] ? of->type : "*", - of->compatible[0] ? of->compatible : "*"); - - /* Replace all whitespace with underscores */ - for (tmp = alias; tmp && *tmp; tmp++) - if (isspace (*tmp)) - *tmp = '_'; - - return 1; -} - /* Ignore any prefix, eg. v850 prepends _ */ static inline int sym_is(const char *symbol, const char *name) { @@ -419,10 +401,6 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, else if (sym_is(symname, "__mod_pcmcia_device_table")) do_table(symval, sym->st_size, sizeof(struct pcmcia_device_id), do_pcmcia_entry, mod); - else if (sym_is(symname, "__mod_of_device_table")) - do_table(symval, sym->st_size, sizeof(struct of_device_id), - do_of_entry, mod); - } /* Now add out buffered information to the generated C source */ diff --git a/trunk/sound/pci/bt87x.c b/trunk/sound/pci/bt87x.c index c5557eaf3e2e..15202f15a02b 100644 --- a/trunk/sound/pci/bt87x.c +++ b/trunk/sound/pci/bt87x.c @@ -806,7 +806,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci) int i; const struct pci_device_id *supported; - supported = pci_match_device(&driver, pci); + supported = pci_match_device(driver, pci); if (supported) return supported->driver_data;