Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210640
b: refs/heads/master
c: 62b2be5
h: refs/heads/master
v: v3
  • Loading branch information
Latchesar Ionkov authored and Eric Van Hensbergen committed Sep 13, 2010
1 parent 7fdefaa commit bdde485
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 64 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: 2bb3a259d8205e5779d59343994828376b0e2d96
refs/heads/master: 62b2be591a9b12c550308ef7718a31abfc815b50
1 change: 0 additions & 1 deletion trunk/drivers/net/ll_temac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <linux/of_device.h>
#include <linux/of_mdio.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/tcp.h> /* needed for sizeof(tcphdr) */
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/ll_temac_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <linux/phy.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_address.h>
#include <linux/slab.h>
#include <linux/of_mdio.h>

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/serial/mpc52xx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ static int __init mpc512x_psc_fifoc_init(void)
psc_fifoc = of_iomap(np, 0);
if (!psc_fifoc) {
pr_err("%s: Can't map FIFOC\n", __func__);
of_node_put(np);
return -ENODEV;
}

Expand Down
16 changes: 7 additions & 9 deletions trunk/drivers/spi/amba-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,8 @@ static void giveback(struct pl022 *pl022)
msg->state = NULL;
if (msg->complete)
msg->complete(msg->context);
/* This message is completed, so let's turn off the clocks! */
/* This message is completed, so let's turn off the clock! */
clk_disable(pl022->clk);
amba_pclk_disable(pl022->adev);
}

/**
Expand Down Expand Up @@ -1140,10 +1139,9 @@ static void pump_messages(struct work_struct *work)
/* Setup the SPI using the per chip configuration */
pl022->cur_chip = spi_get_ctldata(pl022->cur_msg->spi);
/*
* We enable the clocks here, then the clocks will be disabled when
* We enable the clock here, then the clock will be disabled when
* giveback() is called in each method (poll/interrupt/DMA)
*/
amba_pclk_enable(pl022->adev);
clk_enable(pl022->clk);
restore_state(pl022);
flush(pl022);
Expand Down Expand Up @@ -1788,9 +1786,11 @@ pl022_probe(struct amba_device *adev, struct amba_id *id)
}

/* Disable SSP */
clk_enable(pl022->clk);
writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
SSP_CR1(pl022->virtbase));
load_ssp_default_config(pl022);
clk_disable(pl022->clk);

status = request_irq(adev->irq[0], pl022_interrupt_handler, 0, "pl022",
pl022);
Expand Down Expand Up @@ -1818,8 +1818,6 @@ pl022_probe(struct amba_device *adev, struct amba_id *id)
goto err_spi_register;
}
dev_dbg(dev, "probe succeded\n");
/* Disable the silicon block pclk and clock it when needed */
amba_pclk_disable(adev);
return 0;

err_spi_register:
Expand Down Expand Up @@ -1881,9 +1879,9 @@ static int pl022_suspend(struct amba_device *adev, pm_message_t state)
return status;
}

amba_pclk_enable(adev);
clk_enable(pl022->clk);
load_ssp_default_config(pl022);
amba_pclk_disable(adev);
clk_disable(pl022->clk);
dev_dbg(&adev->dev, "suspended\n");
return 0;
}
Expand Down Expand Up @@ -1983,7 +1981,7 @@ static int __init pl022_init(void)
return amba_driver_register(&pl022_driver);
}

subsys_initcall(pl022_init);
module_init(pl022_init);

static void __exit pl022_exit(void)
{
Expand Down
24 changes: 13 additions & 11 deletions trunk/drivers/spi/dw_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ static void flush(struct dw_spi *dws)
wait_till_not_busy(dws);
}

static void null_cs_control(u32 command)
{
}

static int null_writer(struct dw_spi *dws)
{
u8 n_bytes = dws->n_bytes;
Expand Down Expand Up @@ -318,7 +322,7 @@ static void giveback(struct dw_spi *dws)
struct spi_transfer,
transfer_list);

if (!last_transfer->cs_change && dws->cs_control)
if (!last_transfer->cs_change)
dws->cs_control(MRST_SPI_DEASSERT);

msg->state = NULL;
Expand Down Expand Up @@ -392,11 +396,6 @@ static irqreturn_t interrupt_transfer(struct dw_spi *dws)
static irqreturn_t dw_spi_irq(int irq, void *dev_id)
{
struct dw_spi *dws = dev_id;
u16 irq_status, irq_mask = 0x3f;

irq_status = dw_readw(dws, isr) & irq_mask;
if (!irq_status)
return IRQ_NONE;

if (!dws->cur_msg) {
spi_mask_intr(dws, SPI_INT_TXEI);
Expand Down Expand Up @@ -545,13 +544,13 @@ static void pump_transfers(unsigned long data)
*/
if (dws->cs_control) {
if (dws->rx && dws->tx)
chip->tmode = SPI_TMOD_TR;
chip->tmode = 0x00;
else if (dws->rx)
chip->tmode = SPI_TMOD_RO;
chip->tmode = 0x02;
else
chip->tmode = SPI_TMOD_TO;
chip->tmode = 0x01;

cr0 &= ~SPI_TMOD_MASK;
cr0 &= ~(0x3 << SPI_MODE_OFFSET);
cr0 |= (chip->tmode << SPI_TMOD_OFFSET);
}

Expand Down Expand Up @@ -700,6 +699,9 @@ static int dw_spi_setup(struct spi_device *spi)
chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL);
if (!chip)
return -ENOMEM;

chip->cs_control = null_cs_control;
chip->enable_dma = 0;
}

/*
Expand Down Expand Up @@ -881,7 +883,7 @@ int __devinit dw_spi_add_host(struct dw_spi *dws)
dws->dma_inited = 0;
dws->dma_addr = (dma_addr_t)(dws->paddr + 0x60);

ret = request_irq(dws->irq, dw_spi_irq, IRQF_SHARED,
ret = request_irq(dws->irq, dw_spi_irq, 0,
"dw_spi", dws);
if (ret < 0) {
dev_err(&master->dev, "can not get IRQ\n");
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,11 @@ int spi_register_master(struct spi_master *master)
EXPORT_SYMBOL_GPL(spi_register_master);


static int __unregister(struct device *dev, void *null)
static int __unregister(struct device *dev, void *master_dev)
{
spi_unregister_device(to_spi_device(dev));
/* note: before about 2.6.14-rc1 this would corrupt memory: */
if (dev != master_dev)
spi_unregister_device(to_spi_device(dev));
return 0;
}

Expand All @@ -574,7 +576,8 @@ void spi_unregister_master(struct spi_master *master)
{
int dummy;

dummy = device_for_each_child(&master->dev, NULL, __unregister);
dummy = device_for_each_child(master->dev.parent, &master->dev,
__unregister);
device_unregister(&master->dev);
}
EXPORT_SYMBOL_GPL(spi_unregister_master);
Expand Down
37 changes: 12 additions & 25 deletions trunk/drivers/spi/spi_s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ static void flush_fifo(struct s3c64xx_spi_driver_data *sdd)
val = readl(regs + S3C64XX_SPI_STATUS);
} while (TX_FIFO_LVL(val, sci) && loops--);

if (loops == 0)
dev_warn(&sdd->pdev->dev, "Timed out flushing TX FIFO\n");

/* Flush RxFIFO*/
loops = msecs_to_loops(1);
do {
Expand All @@ -213,9 +210,6 @@ static void flush_fifo(struct s3c64xx_spi_driver_data *sdd)
break;
} while (loops--);

if (loops == 0)
dev_warn(&sdd->pdev->dev, "Timed out flushing RX FIFO\n");

val = readl(regs + S3C64XX_SPI_CH_CFG);
val &= ~S3C64XX_SPI_CH_SW_RST;
writel(val, regs + S3C64XX_SPI_CH_CFG);
Expand Down Expand Up @@ -326,17 +320,16 @@ static int wait_for_xfer(struct s3c64xx_spi_driver_data *sdd,

/* millisecs to xfer 'len' bytes @ 'cur_speed' */
ms = xfer->len * 8 * 1000 / sdd->cur_speed;
ms += 10; /* some tolerance */
ms += 5; /* some tolerance */

if (dma_mode) {
val = msecs_to_jiffies(ms) + 10;
val = wait_for_completion_timeout(&sdd->xfer_completion, val);
} else {
u32 status;
val = msecs_to_loops(ms);
do {
status = readl(regs + S3C64XX_SPI_STATUS);
} while (RX_FIFO_LVL(status, sci) < xfer->len && --val);
val = readl(regs + S3C64XX_SPI_STATUS);
} while (RX_FIFO_LVL(val, sci) < xfer->len && --val);
}

if (!val)
Expand Down Expand Up @@ -454,8 +447,8 @@ static void s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
writel(val, regs + S3C64XX_SPI_CLK_CFG);
}

static void s3c64xx_spi_dma_rxcb(struct s3c2410_dma_chan *chan, void *buf_id,
int size, enum s3c2410_dma_buffresult res)
void s3c64xx_spi_dma_rxcb(struct s3c2410_dma_chan *chan, void *buf_id,
int size, enum s3c2410_dma_buffresult res)
{
struct s3c64xx_spi_driver_data *sdd = buf_id;
unsigned long flags;
Expand All @@ -474,8 +467,8 @@ static void s3c64xx_spi_dma_rxcb(struct s3c2410_dma_chan *chan, void *buf_id,
spin_unlock_irqrestore(&sdd->lock, flags);
}

static void s3c64xx_spi_dma_txcb(struct s3c2410_dma_chan *chan, void *buf_id,
int size, enum s3c2410_dma_buffresult res)
void s3c64xx_spi_dma_txcb(struct s3c2410_dma_chan *chan, void *buf_id,
int size, enum s3c2410_dma_buffresult res)
{
struct s3c64xx_spi_driver_data *sdd = buf_id;
unsigned long flags;
Expand Down Expand Up @@ -515,9 +508,8 @@ static int s3c64xx_spi_map_mssg(struct s3c64xx_spi_driver_data *sdd,
list_for_each_entry(xfer, &msg->transfers, transfer_list) {

if (xfer->tx_buf != NULL) {
xfer->tx_dma = dma_map_single(dev,
(void *)xfer->tx_buf, xfer->len,
DMA_TO_DEVICE);
xfer->tx_dma = dma_map_single(dev, xfer->tx_buf,
xfer->len, DMA_TO_DEVICE);
if (dma_mapping_error(dev, xfer->tx_dma)) {
dev_err(dev, "dma_map_single Tx failed\n");
xfer->tx_dma = XFER_DMAADDR_INVALID;
Expand Down Expand Up @@ -927,13 +919,6 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
return -ENODEV;
}

sci = pdev->dev.platform_data;
if (!sci->src_clk_name) {
dev_err(&pdev->dev,
"Board init must call s3c64xx_spi_set_info()\n");
return -EINVAL;
}

/* Check for availability of necessary resource */

dmatx_res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
Expand Down Expand Up @@ -961,6 +946,8 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
return -ENOMEM;
}

sci = pdev->dev.platform_data;

platform_set_drvdata(pdev, master);

sdd = spi_master_get_devdata(master);
Expand Down Expand Up @@ -1183,7 +1170,7 @@ static int __init s3c64xx_spi_init(void)
{
return platform_driver_probe(&s3c64xx_spi_driver, s3c64xx_spi_probe);
}
subsys_initcall(s3c64xx_spi_init);
module_init(s3c64xx_spi_init);

static void __exit s3c64xx_spi_exit(void)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,7 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
v9fs_stat2inode(st, dentry->d_inode, dentry->d_inode->i_sb);
generic_fillattr(dentry->d_inode, stat);

p9stat_free(st);
kfree(st);
return 0;
}
Expand Down Expand Up @@ -1489,6 +1490,7 @@ static int v9fs_readlink(struct dentry *dentry, char *buffer, int buflen)

retval = strnlen(buffer, buflen);
done:
p9stat_free(st);
kfree(st);
return retval;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/errno.h>

struct device;
struct gpio_chip;

/*
* Some platforms don't support the GPIO programming interface.
Expand Down
10 changes: 2 additions & 8 deletions trunk/include/linux/quotaops.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,8 @@ static inline int dquot_alloc_space(struct inode *inode, qsize_t nr)
int ret;

ret = dquot_alloc_space_nodirty(inode, nr);
if (!ret) {
/*
* Mark inode fully dirty. Since we are allocating blocks, inode
* would become fully dirty soon anyway and it reportedly
* reduces inode_lock contention.
*/
mark_inode_dirty(inode);
}
if (!ret)
mark_inode_dirty_sync(inode);
return ret;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/spi/dw_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
#define SPI_MODE_OFFSET 6
#define SPI_SCPH_OFFSET 6
#define SPI_SCOL_OFFSET 7

#define SPI_TMOD_OFFSET 8
#define SPI_TMOD_MASK (0x3 << SPI_TMOD_OFFSET)
#define SPI_TMOD_TR 0x0 /* xmit & recv */
#define SPI_TMOD_TO 0x1 /* xmit only */
#define SPI_TMOD_RO 0x2 /* recv only */
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,10 @@ static void p9_tag_cleanup(struct p9_client *c)
}
}

if (c->tagpool)
if (c->tagpool) {
p9_idpool_put(0, c->tagpool); /* free reserved tag 0 */
p9_idpool_destroy(c->tagpool);
}

/* free requests associated with tags */
for (row = 0; row < (c->max_tag/P9_ROW_MAXTAG); row++) {
Expand Down Expand Up @@ -944,6 +946,7 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames,
int16_t nwqids, count;

err = 0;
wqids = NULL;
clnt = oldfid->clnt;
if (clone) {
fid = p9_fid_create(clnt);
Expand Down Expand Up @@ -994,9 +997,11 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames,
else
fid->qid = oldfid->qid;

kfree(wqids);
return fid;

clunk_fid:
kfree(wqids);
p9_client_clunk(fid);
fid = NULL;

Expand Down

0 comments on commit bdde485

Please sign in to comment.