Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190491
b: refs/heads/master
c: be1066b
h: refs/heads/master
i:
  190489: 648b7bd
  190487: a5cf31b
v: v3
  • Loading branch information
Linus Torvalds committed Apr 30, 2010
1 parent b15da49 commit 50789cd
Show file tree
Hide file tree
Showing 44 changed files with 243 additions and 135 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4839737b3b6af2a9b3b960584f08177fbc9bf118
refs/heads/master: be1066bbcd443a65df312fdecea7e4959adedb45
2 changes: 1 addition & 1 deletion trunk/Documentation/spi/spidev_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-omap/include/plat/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct ehci_hcd_omap_platform_data {
struct omap_musb_board_data {
u8 interface_type;
u8 mode;
u8 power;
u16 power;
};

enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/char/isicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,8 @@ static int isicom_open(struct tty_struct *tty, struct file *filp)
if (tport == NULL)
return -ENODEV;
port = container_of(tport, struct isi_port, port);
card = &isi_card[BOARD(tty->index)];

tty->driver_data = port;
return tty_port_open(tport, tty, filp);
}

Expand Down Expand Up @@ -936,7 +936,12 @@ static void isicom_shutdown(struct tty_port *port)
static void isicom_close(struct tty_struct *tty, struct file *filp)
{
struct isi_port *ip = tty->driver_data;
struct tty_port *port = &ip->port;
struct tty_port *port;

if (ip == NULL)
return;

port = &ip->port;
if (isicom_paranoia_check(ip, tty->name, "isicom_close"))
return;
tty_port_close(port, tty, filp);
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/char/istallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
return -ENODEV;
if (portp->devnr < 1)
return -ENODEV;

tty->driver_data = portp;
return tty_port_open(&portp->port, tty, filp);
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/char/mxser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
if (!info->ioaddr)
return -ENODEV;

tty->driver_data = info;
return tty_port_open(&info->port, tty, filp);
}

Expand Down Expand Up @@ -1074,7 +1075,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
struct mxser_port *info = tty->driver_data;
struct tty_port *port = &info->port;

if (tty->index == MXSER_PORTS)
if (tty->index == MXSER_PORTS || info == NULL)
return;
if (tty_port_close_start(port, tty, filp) == 0)
return;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/riscom8.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ static int rc_open(struct tty_struct *tty, struct file *filp)
if (error)
return error;

tty->driver_data = port;
return tty_port_open(&port->port, tty, filp);
}

Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/char/stallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
{
struct stlport *portp;
struct stlbrd *brdp;
struct tty_port *port;
unsigned int minordev, brdnr, panelnr;
int portnr;

Expand Down Expand Up @@ -754,7 +753,8 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
portp = brdp->panels[panelnr]->ports[portnr];
if (portp == NULL)
return -ENODEV;
port = &portp->port;

tty->driver_data = portp;
return tty_port_open(&portp->port, tty, filp);

}
Expand Down Expand Up @@ -841,7 +841,8 @@ static void stl_close(struct tty_struct *tty, struct file *filp)
pr_debug("stl_close(tty=%p,filp=%p)\n", tty, filp);

portp = tty->driver_data;
BUG_ON(portp == NULL);
if(portp == NULL)
return;
tty_port_close(&portp->port, tty, filp);
}

Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/edac/edac_mce_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ static void amd_decode_ls_mce(u64 mc3_status)
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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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"));

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/of/of_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/serial/8250_pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ static const struct pnp_device_id pnp_dev_table[] = {
{ "FUJ02E6", 0 },
/* Fujitsu Wacom 2FGT Tablet PC device */
{ "FUJ02E7", 0 },
/* Fujitsu Wacom 1FGT Tablet PC device */
{ "FUJ02E9", 0 },
/*
* LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in
* disguise)
Expand Down
33 changes: 0 additions & 33 deletions trunk/drivers/serial/mpc52xx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,39 +29,6 @@
* 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>
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/serial/pmac_zilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,10 @@ static void pmz_break_ctl(struct uart_port *port, int break_state)
uap->curregs[R5] = new_reg;

/* NOTE: Not subject to 'transmitter active' rule. */
if (ZS_IS_ASLEEP(uap))
if (ZS_IS_ASLEEP(uap)) {
spin_unlock_irqrestore(&port->lock, flags);
return;
}
write_zsreg(uap, R5, uap->curregs[R5]);
}

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/spi/omap2_mcspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand All @@ -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
}
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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. */
Expand All @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,9 @@ static const struct usb_device_id acm_ids[] = {
{ USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
},
{ USB_DEVICE(0x1576, 0x03b1), /* Maretron USB100 */
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
},

/* Nokia S60 phones expose two ACM channels. The first is
* a modem and is picked up by the standard AT-command
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ config USB_SUSPEND
config USB_OTG
bool
depends on USB && EXPERIMENTAL
select USB_SUSPEND
depends on USB_SUSPEND
default n


Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/core/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int usb_choose_configuration(struct usb_device *udev)
* than a vendor-specific driver. */
else if (udev->descriptor.bDeviceClass !=
USB_CLASS_VENDOR_SPEC &&
(!desc || desc->bInterfaceClass !=
(desc && desc->bInterfaceClass !=
USB_CLASS_VENDOR_SPEC)) {
best = c;
break;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/core/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,13 @@ static int fs_create_by_name (const char *name, mode_t mode,
*dentry = NULL;
mutex_lock(&parent->d_inode->i_mutex);
*dentry = lookup_one_len(name, parent, strlen(name));
if (!IS_ERR(dentry)) {
if (!IS_ERR(*dentry)) {
if ((mode & S_IFMT) == S_IFDIR)
error = usbfs_mkdir (parent->d_inode, *dentry, mode);
else
error = usbfs_create (parent->d_inode, *dentry, mode);
} else
error = PTR_ERR(dentry);
error = PTR_ERR(*dentry);
mutex_unlock(&parent->d_inode->i_mutex);

return error;
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/usb/core/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,
EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor);

/**
* usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP
* usb_alloc_coherent - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP
* @dev: device the buffer will be used with
* @size: requested buffer size
* @mem_flags: affect whether allocation may block
Expand All @@ -737,38 +737,38 @@ EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor);
* architectures where CPU caches are not DMA-coherent. On systems without
* bus-snooping caches, these buffers are uncached.
*
* When the buffer is no longer used, free it with usb_buffer_free().
* When the buffer is no longer used, free it with usb_free_coherent().
*/
void *usb_buffer_alloc(struct usb_device *dev, size_t size, gfp_t mem_flags,
dma_addr_t *dma)
void *usb_alloc_coherent(struct usb_device *dev, size_t size, gfp_t mem_flags,
dma_addr_t *dma)
{
if (!dev || !dev->bus)
return NULL;
return hcd_buffer_alloc(dev->bus, size, mem_flags, dma);
}
EXPORT_SYMBOL_GPL(usb_buffer_alloc);
EXPORT_SYMBOL_GPL(usb_alloc_coherent);

/**
* usb_buffer_free - free memory allocated with usb_buffer_alloc()
* usb_free_coherent - free memory allocated with usb_alloc_coherent()
* @dev: device the buffer was used with
* @size: requested buffer size
* @addr: CPU address of buffer
* @dma: DMA address of buffer
*
* This reclaims an I/O buffer, letting it be reused. The memory must have
* been allocated using usb_buffer_alloc(), and the parameters must match
* been allocated using usb_alloc_coherent(), and the parameters must match
* those provided in that allocation request.
*/
void usb_buffer_free(struct usb_device *dev, size_t size, void *addr,
dma_addr_t dma)
void usb_free_coherent(struct usb_device *dev, size_t size, void *addr,
dma_addr_t dma)
{
if (!dev || !dev->bus)
return;
if (!addr)
return;
hcd_buffer_free(dev->bus, size, addr, dma);
}
EXPORT_SYMBOL_GPL(usb_buffer_free);
EXPORT_SYMBOL_GPL(usb_free_coherent);

/**
* usb_buffer_map - create DMA mapping(s) for an urb
Expand Down
Loading

0 comments on commit 50789cd

Please sign in to comment.