Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26987
b: refs/heads/master
c: ecd6885
h: refs/heads/master
i:
  26985: dcbcc6b
  26983: d5a85ec
v: v3
  • Loading branch information
Linus Torvalds committed May 26, 2006
1 parent 56f0b75 commit 8035b47
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 56 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: 3041a069090224462e27da1bc9483b463eb40841
refs/heads/master: ecd68853b852cdafb138f9c437f3a751fe7dc381
1 change: 1 addition & 0 deletions trunk/arch/i386/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,4 @@ ENTRY(sys_call_table)
.long sys_splice
.long sys_sync_file_range
.long sys_tee /* 315 */
.long sys_vmsplice
12 changes: 12 additions & 0 deletions trunk/arch/powerpc/platforms/powermac/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,23 @@ static int pmac_pm_finish(suspend_state_t state)
return 0;
}

static int pmac_pm_valid(suspend_state_t state)
{
switch (state) {
case PM_SUSPEND_DISK:
return 1;
/* can't do any other states via generic mechanism yet */
default:
return 0;
}
}

static struct pm_ops pmac_pm_ops = {
.pm_disk_mode = PM_DISK_SHUTDOWN,
.prepare = pmac_pm_prepare,
.enter = pmac_pm_enter,
.finish = pmac_pm_finish,
.valid = pmac_pm_valid,
};

#endif /* CONFIG_SOFTWARE_SUSPEND */
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,6 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
}

vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0));
if ((vendor & 0xFFFF) == 0xFFFF) {
rc = -ENODEV;
goto out_err;
}

/* Default timeouts */
chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/i2c/busses/scx200_acb.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static struct pci_device_id divil_pci[] = {

#define MSR_LBAR_SMB 0x5140000B

static int scx200_add_cs553x(void)
static __init int scx200_add_cs553x(void)
{
u32 low, hi;
u32 smb_base;
Expand Down
41 changes: 21 additions & 20 deletions trunk/drivers/infiniband/hw/mthca/mthca_srq.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,26 +490,7 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,

first_ind = srq->first_free;

for (nreq = 0; wr; ++nreq, wr = wr->next) {
if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) {
nreq = 0;

doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift);
doorbell[1] = cpu_to_be32(srq->srqn << 8);

/*
* Make sure that descriptors are written
* before doorbell is rung.
*/
wmb();

mthca_write64(doorbell,
dev->kar + MTHCA_RECEIVE_DOORBELL,
MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));

first_ind = srq->first_free;
}

for (nreq = 0; wr; wr = wr->next) {
ind = srq->first_free;

if (ind < 0) {
Expand Down Expand Up @@ -569,6 +550,26 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, struct ib_recv_wr *wr,

srq->wrid[ind] = wr->wr_id;
srq->first_free = next_ind;

++nreq;
if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) {
nreq = 0;

doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift);
doorbell[1] = cpu_to_be32(srq->srqn << 8);

/*
* Make sure that descriptors are written
* before doorbell is rung.
*/
wmb();

mthca_write64(doorbell,
dev->kar + MTHCA_RECEIVE_DOORBELL,
MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock));

first_ind = srq->first_free;
}
}

if (likely(nreq)) {
Expand Down
53 changes: 28 additions & 25 deletions trunk/drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@


/*
* This code has been tested on an ads7846 / N770 device.
* This code has been heavily tested on a Nokia 770, and lightly
* tested on other ads7846 devices (OSK/Mistral, Lubbock).
* Support for ads7843 and ads7845 has only been stubbed in.
*
* Not yet done: How accurate are the temperature and voltage
* readings? (System-specific calibration should support
* accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.)
*
* IRQ handling needs a workaround because of a shortcoming in handling
* edge triggered IRQs on some platforms like the OMAP1/2. These
* platforms don't handle the ARM lazy IRQ disabling properly, thus we
Expand Down Expand Up @@ -248,10 +245,13 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)

if (req->msg.status)
status = req->msg.status;

/* on-wire is a must-ignore bit, a BE12 value, then padding */
sample = be16_to_cpu(req->sample);
sample = sample >> 4;
kfree(req);
sample = sample >> 3;
sample &= 0x0fff;

kfree(req);
return status ? status : sample;
}

Expand Down Expand Up @@ -336,13 +336,13 @@ static void ads7846_rx(void *ads)
u16 x, y, z1, z2;
unsigned long flags;

/* adjust: 12 bit samples (left aligned), built from
* two 8 bit values writen msb-first.
/* adjust: on-wire is a must-ignore bit, a BE12 value, then padding;
* built from two 8 bit values written msb-first.
*/
x = be16_to_cpu(ts->tc.x) >> 4;
y = be16_to_cpu(ts->tc.y) >> 4;
z1 = be16_to_cpu(ts->tc.z1) >> 4;
z2 = be16_to_cpu(ts->tc.z2) >> 4;
x = (be16_to_cpu(ts->tc.x) >> 3) & 0x0fff;
y = (be16_to_cpu(ts->tc.y) >> 3) & 0x0fff;
z1 = (be16_to_cpu(ts->tc.z1) >> 3) & 0x0fff;
z2 = (be16_to_cpu(ts->tc.z2) >> 3) & 0x0fff;

/* range filtering */
if (x == MAX_12BIT)
Expand Down Expand Up @@ -420,7 +420,7 @@ static void ads7846_debounce(void *ads)

m = &ts->msg[ts->msg_idx];
t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list);
val = (*(u16 *)t->rx_buf) >> 3;
val = (be16_to_cpu(*(__be16 *)t->rx_buf) >> 3) & 0x0fff;
if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) {
/* Repeat it, if this was the first read or the read
* wasn't consistent enough. */
Expand Down Expand Up @@ -469,7 +469,7 @@ static void ads7846_timer(unsigned long handle)
spin_lock_irq(&ts->lock);

if (unlikely(ts->msg_idx && !ts->pendown)) {
/* measurment cycle ended */
/* measurement cycle ended */
if (!device_suspended(&ts->spi->dev)) {
ts->irq_disabled = 0;
enable_irq(ts->spi->irq);
Expand All @@ -495,11 +495,10 @@ static irqreturn_t ads7846_irq(int irq, void *handle, struct pt_regs *regs)
spin_lock_irqsave(&ts->lock, flags);
if (likely(ts->get_pendown_state())) {
if (!ts->irq_disabled) {
/* REVISIT irq logic for many ARM chips has cloned a
* bug wherein disabling an irq in its handler won't
* work;(it's disabled lazily, and too late to work.
* until all their irq logic is fixed, we must shadow
* that state here.
/* The ARM do_simple_IRQ() dispatcher doesn't act
* like the other dispatchers: it will report IRQs
* even after they've been disabled. We work around
* that here. (The "generic irq" framework may help...)
*/
ts->irq_disabled = 1;
disable_irq(ts->spi->irq);
Expand Down Expand Up @@ -609,16 +608,20 @@ static int __devinit ads7846_probe(struct spi_device *spi)
return -EINVAL;
}

/* REVISIT when the irq can be triggered active-low, or if for some
* reason the touchscreen isn't hooked up, we don't need to access
* the pendown state.
*/
if (pdata->get_pendown_state == NULL) {
dev_dbg(&spi->dev, "no get_pendown_state function?\n");
return -EINVAL;
}

/* We'd set the wordsize to 12 bits ... except that some controllers
* will then treat the 8 bit command words as 12 bits (and drop the
* four MSBs of the 12 bit result). Result: inputs must be shifted
* to discard the four garbage LSBs.
/* We'd set TX wordsize 8 bits and RX wordsize to 13 bits ... except
* that even if the hardware can do that, the SPI controller driver
* may not. So we stick to very-portable 8 bit words, both RX and TX.
*/
spi->bits_per_word = 8;

ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL);
input_dev = input_allocate_device();
Expand Down Expand Up @@ -772,7 +775,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)

if (request_irq(spi->irq, ads7846_irq,
SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING,
spi->dev.bus_id, ts)) {
spi->dev.driver->name, ts)) {
dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
err = -EBUSY;
goto err_free_mem;
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -5028,8 +5028,10 @@ static int md_notify_reboot(struct notifier_block *this,
printk(KERN_INFO "md: stopping all md devices.\n");

ITERATE_MDDEV(mddev,tmp)
if (mddev_trylock(mddev))
if (mddev_trylock(mddev)) {
do_md_stop (mddev, 1);
mddev_unlock(mddev);
}
/*
* certain more exotic SCSI devices are known to be
* volatile wrt too early system reboots. While the
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/spi/spi_s3c24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,15 +405,15 @@ static int s3c24xx_spi_remove(struct platform_device *dev)

static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg)
{
struct s3c24xx_spi *hw = platform_get_drvdata(dev);
struct s3c24xx_spi *hw = platform_get_drvdata(pdev);

clk_disable(hw->clk);
return 0;
}

static int s3c24xx_spi_resume(struct platform_device *pdev)
{
struct s3c24xx_spi *hw = platform_get_drvdata(dev);
struct s3c24xx_spi *hw = platform_get_drvdata(pdev);

clk_enable(hw->clk);
return 0;
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/affs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,9 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
return retval;
}

retval = -EIO;
bh = affs_bread(sb, old_dentry->d_inode->i_ino);
if (!bh)
goto done;
return -EIO;

/* Remove header from its parent directory. */
affs_lock_dir(old_dir);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-alpha/termbits.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ struct termios {
#define HUPCL 00040000

#define CLOCAL 00100000
#define CMSPAR 010000000000 /* mark or space (stick) parity */
#define CRTSCTS 020000000000 /* flow control */

/* c_lflag bits */
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-powerpc/termbits.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ struct termios {
#define HUPCL 00040000

#define CLOCAL 00100000
#define CMSPAR 010000000000 /* mark or space (stick) parity */
#define CRTSCTS 020000000000 /* flow control */

/* c_lflag bits */
Expand Down

0 comments on commit 8035b47

Please sign in to comment.