Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Apr 2010 17:16:11 +0000 (10:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Apr 2010 17:16:11 +0000 (10:16 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (29 commits)
  USB: sl811-hcd: Fix device disconnect
  USB: ohci-at91: fix power management hanging
  USB: rename usb_buffer_alloc() and usb_buffer_free()
  USB: ti_usb: fix printk format warning
  USB: gadget: s3c-hsotg: Add missing unlock
  USB: fix build on OMAPs if CONFIG_PM_RUNTIME is not set
  USB: oxu210hp: release spinlock on error path
  USB: serial: option: add cinterion device id
  USB: serial: option: ZTEAC8710 Support with Device ID 0xffff
  USB: serial: pl2303: Hybrid reader Uniform HCR331
  USB: option: add ID for ZTE MF 330
  USB: xhci: properly set endpoint context fields for periodic eps.
  USB: xhci: properly set the "Mult" field of the endpoint context.
  USB: OHCI: don't look at the root hub to get the number of ports
  USB: don't choose configs with no interfaces
  USB: cdc-acm: add another device quirk
  USB: fix testing the wrong variable in fs_create_by_name()
  usb: Fix tusb6010 for DMA API
  musb_core: fix musb_init_controller() error cleanup path
  MUSB: fix DaVinci glue layer dependency
  ...

Documentation/spi/spidev_test.c
drivers/edac/edac_mce_amd.c
drivers/gpio/gpiolib.c
drivers/of/of_mdio.c
drivers/serial/mpc52xx_uart.c
drivers/spi/omap2_mcspi.c
drivers/spi/spi.c
fs/notify/inotify/Kconfig

index 10abd37..16feda9 100644 (file)
@@ -58,7 +58,7 @@ static void transfer(int fd)
        };
 
        ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
-       if (ret == 1)
+       if (ret < 1)
                pabort("can't send spi message");
 
        for (ret = 0; ret < ARRAY_SIZE(tx); ret++) {
index f5b6d9f..97e64bc 100644 (file)
@@ -294,7 +294,6 @@ wrong_ls_mce:
 void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors)
 {
        u32 ec  = ERROR_CODE(regs->nbsl);
-       u32 xec = EXT_ERROR_CODE(regs->nbsl);
 
        if (!handle_errors)
                return;
@@ -324,7 +323,7 @@ void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors)
                pr_cont("\n");
        }
 
-       pr_emerg("%s.\n", EXT_ERR_MSG(xec));
+       pr_emerg("%s.\n", EXT_ERR_MSG(regs->nbsl));
 
        if (BUS_ERROR(ec) && nb_bus_decoder)
                nb_bus_decoder(node_id, regs);
@@ -374,7 +373,7 @@ static int amd_decode_mce(struct notifier_block *nb, unsigned long val,
                 ((m->status & MCI_STATUS_PCC) ? "yes" : "no"));
 
        /* do the two bits[14:13] together */
-       ecc = m->status & (3ULL << 45);
+       ecc = (m->status >> 45) & 0x3;
        if (ecc)
                pr_cont(", %sECC Error", ((ecc == 2) ? "C" : "U"));
 
index 76be229..eb0c3fe 100644 (file)
@@ -416,7 +416,8 @@ static int gpio_setup_irq(struct gpio_desc *desc, struct device *dev,
        return 0;
 
 free_sd:
-       sysfs_put(pdesc->value_sd);
+       if (pdesc)
+               sysfs_put(pdesc->value_sd);
 free_id:
        idr_remove(&pdesc_idr, id);
        desc->flags &= GPIO_FLAGS_MASK;
index 18ecae4..b474833 100644 (file)
@@ -69,7 +69,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
                }
 
                phy = get_phy_device(mdio, be32_to_cpup(addr));
-               if (!phy) {
+               if (!phy || IS_ERR(phy)) {
                        dev_err(&mdio->dev, "error probing PHY at address %i\n",
                                *addr);
                        continue;
index 3119fdd..a176ab4 100644 (file)
  * kind, whether express or implied.
  */
 
-/* Platform device Usage :
- *
- * Since PSCs can have multiple function, the correct driver for each one
- * is selected by calling mpc52xx_match_psc_function(...). The function
- * handled by this driver is "uart".
- *
- * The driver init all necessary registers to place the PSC in uart mode without
- * DCD. However, the pin multiplexing aren't changed and should be set either
- * by the bootloader or in the platform init code.
- *
- * The idx field must be equal to the PSC index (e.g. 0 for PSC1, 1 for PSC2,
- * and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and
- * so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly
- * fpr the console code : without this 1:1 mapping, at early boot time, when we
- * are parsing the kernel args console=ttyPSC?, we wouldn't know which PSC it
- * will be mapped to.
- */
-
-/* OF Platform device Usage :
- *
- * This driver is only used for PSCs configured in uart mode.  The device
- * tree will have a node for each PSC with "mpc52xx-psc-uart" in the compatible
- * list.
- *
- * By default, PSC devices are enumerated in the order they are found.  However
- * a particular PSC number can be forces by adding 'device_no = <port#>'
- * to the device node.
- *
- * The driver init all necessary registers to place the PSC in uart mode without
- * DCD. However, the pin multiplexing aren't changed and should be set either
- * by the bootloader or in the platform init code.
- */
-
 #undef DEBUG
 
 #include <linux/device.h>
index d8356af..e0de0d0 100644 (file)
@@ -204,6 +204,7 @@ static inline void mcspi_write_chconf0(const struct spi_device *spi, u32 val)
 
        cs->chconf0 = val;
        mcspi_write_cs_reg(spi, OMAP2_MCSPI_CHCONF0, val);
+       mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHCONF0);
 }
 
 static void omap2_mcspi_set_dma_req(const struct spi_device *spi,
@@ -532,7 +533,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
                                        goto out;
                                }
 #ifdef VERBOSE
-                               dev_dbg(&spi->dev, "write-%d %04x\n",
+                               dev_dbg(&spi->dev, "write-%d %08x\n",
                                                word_len, *tx);
 #endif
                                __raw_writel(*tx++, tx_reg);
@@ -550,7 +551,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer)
                                        mcspi_write_chconf0(spi, l);
                                *rx++ = __raw_readl(rx_reg);
 #ifdef VERBOSE
-                               dev_dbg(&spi->dev, "read-%d %04x\n",
+                               dev_dbg(&spi->dev, "read-%d %08x\n",
                                                word_len, *(rx - 1));
 #endif
                        }
index 9ffb0fd..b3a1f92 100644 (file)
@@ -41,7 +41,7 @@ static void spidev_release(struct device *dev)
                spi->master->cleanup(spi);
 
        spi_master_put(spi->master);
-       kfree(dev);
+       kfree(spi);
 }
 
 static ssize_t
@@ -257,6 +257,7 @@ int spi_add_device(struct spi_device *spi)
 {
        static DEFINE_MUTEX(spi_add_lock);
        struct device *dev = spi->master->dev.parent;
+       struct device *d;
        int status;
 
        /* Chipselects are numbered 0..max; validate. */
@@ -278,10 +279,11 @@ int spi_add_device(struct spi_device *spi)
         */
        mutex_lock(&spi_add_lock);
 
-       if (bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev))
-                       != NULL) {
+       d = bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev));
+       if (d != NULL) {
                dev_err(dev, "chipselect %d already in use\n",
                                spi->chip_select);
+               put_device(d);
                status = -EBUSY;
                goto done;
        }
index 3e56dbf..b3a159b 100644 (file)
@@ -15,6 +15,7 @@ config INOTIFY
 
 config INOTIFY_USER
        bool "Inotify support for userspace"
+       select ANON_INODES
        select FSNOTIFY
        default y
        ---help---