diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/mem.c | 2 | ||||
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 6 | ||||
-rw-r--r-- | drivers/i2c/busses/Kconfig | 3 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-pasemi.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi_s3c24xx.c | 4 |
6 files changed, 12 insertions, 13 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index f5c160caf9f4..5f066963f171 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -248,7 +248,7 @@ static unsigned long get_unmapped_area_mem(struct file *file, | |||
248 | { | 248 | { |
249 | if (!valid_mmap_phys_addr_range(pgoff, len)) | 249 | if (!valid_mmap_phys_addr_range(pgoff, len)) |
250 | return (unsigned long) -EINVAL; | 250 | return (unsigned long) -EINVAL; |
251 | return pgoff; | 251 | return pgoff << PAGE_SHIFT; |
252 | } | 252 | } |
253 | 253 | ||
254 | /* can't do an in-place private mapping if there's no MMU */ | 254 | /* can't do an in-place private mapping if there's no MMU */ |
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index da5828f2dfc2..01206ebb1cf2 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c | |||
@@ -407,7 +407,7 @@ static void w83627ehf_write_fan_div(struct i2c_client *client, int nr) | |||
407 | break; | 407 | break; |
408 | case 4: | 408 | case 4: |
409 | reg = (w83627ehf_read_value(client, W83627EHF_REG_DIODE) & 0x73) | 409 | reg = (w83627ehf_read_value(client, W83627EHF_REG_DIODE) & 0x73) |
410 | | ((data->fan_div[4] & 0x03) << 3) | 410 | | ((data->fan_div[4] & 0x03) << 2) |
411 | | ((data->fan_div[4] & 0x04) << 5); | 411 | | ((data->fan_div[4] & 0x04) << 5); |
412 | w83627ehf_write_value(client, W83627EHF_REG_DIODE, reg); | 412 | w83627ehf_write_value(client, W83627EHF_REG_DIODE, reg); |
413 | break; | 413 | break; |
@@ -471,9 +471,9 @@ static struct w83627ehf_data *w83627ehf_update_device(struct device *dev) | |||
471 | time */ | 471 | time */ |
472 | if (data->fan[i] == 0xff | 472 | if (data->fan[i] == 0xff |
473 | && data->fan_div[i] < 0x07) { | 473 | && data->fan_div[i] < 0x07) { |
474 | dev_dbg(&client->dev, "Increasing fan %d " | 474 | dev_dbg(&client->dev, "Increasing fan%d " |
475 | "clock divider from %u to %u\n", | 475 | "clock divider from %u to %u\n", |
476 | i, div_from_reg(data->fan_div[i]), | 476 | i + 1, div_from_reg(data->fan_div[i]), |
477 | div_from_reg(data->fan_div[i] + 1)); | 477 | div_from_reg(data->fan_div[i] + 1)); |
478 | data->fan_div[i]++; | 478 | data->fan_div[i]++; |
479 | w83627ehf_write_fan_div(client, i); | 479 | w83627ehf_write_fan_div(client, i); |
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index fb19dbb31e42..ece31d2c6c64 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -344,8 +344,7 @@ config I2C_PARPORT_LIGHT | |||
344 | 344 | ||
345 | config I2C_PASEMI | 345 | config I2C_PASEMI |
346 | tristate "PA Semi SMBus interface" | 346 | tristate "PA Semi SMBus interface" |
347 | # depends on PPC_PASEMI && I2C && PCI | 347 | depends on PPC_PASEMI && I2C && PCI |
348 | depends on I2C && PCI | ||
349 | help | 348 | help |
350 | Supports the PA Semi PWRficient on-chip SMBus interfaces. | 349 | Supports the PA Semi PWRficient on-chip SMBus interfaces. |
351 | 350 | ||
diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c index f54fb5d65cc4..bf89eeef74e9 100644 --- a/drivers/i2c/busses/i2c-pasemi.c +++ b/drivers/i2c/busses/i2c-pasemi.c | |||
@@ -141,7 +141,7 @@ static int pasemi_i2c_xfer_msg(struct i2c_adapter *adapter, | |||
141 | for (i = 0; i < msg->len - 1; i++) | 141 | for (i = 0; i < msg->len - 1; i++) |
142 | TXFIFO_WR(smbus, msg->buf[i]); | 142 | TXFIFO_WR(smbus, msg->buf[i]); |
143 | 143 | ||
144 | TXFIFO_WR(smbus, msg->buf[msg->len] | | 144 | TXFIFO_WR(smbus, msg->buf[msg->len-1] | |
145 | (stop ? MTXFIFO_STOP : 0)); | 145 | (stop ? MTXFIFO_STOP : 0)); |
146 | } | 146 | } |
147 | 147 | ||
@@ -226,7 +226,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter, | |||
226 | rd = RXFIFO_RD(smbus); | 226 | rd = RXFIFO_RD(smbus); |
227 | len = min_t(u8, (rd & MRXFIFO_DATA_M), | 227 | len = min_t(u8, (rd & MRXFIFO_DATA_M), |
228 | I2C_SMBUS_BLOCK_MAX); | 228 | I2C_SMBUS_BLOCK_MAX); |
229 | TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ | | 229 | TXFIFO_WR(smbus, len | MTXFIFO_READ | |
230 | MTXFIFO_STOP); | 230 | MTXFIFO_STOP); |
231 | } else { | 231 | } else { |
232 | len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX); | 232 | len = min_t(u8, data->block[0], I2C_SMBUS_BLOCK_MAX); |
@@ -258,7 +258,7 @@ static int pasemi_smb_xfer(struct i2c_adapter *adapter, | |||
258 | rd = RXFIFO_RD(smbus); | 258 | rd = RXFIFO_RD(smbus); |
259 | len = min_t(u8, (rd & MRXFIFO_DATA_M), | 259 | len = min_t(u8, (rd & MRXFIFO_DATA_M), |
260 | I2C_SMBUS_BLOCK_MAX - len); | 260 | I2C_SMBUS_BLOCK_MAX - len); |
261 | TXFIFO_WR(smbus, (len + 1) | MTXFIFO_READ | MTXFIFO_STOP); | 261 | TXFIFO_WR(smbus, len | MTXFIFO_READ | MTXFIFO_STOP); |
262 | break; | 262 | break; |
263 | 263 | ||
264 | default: | 264 | default: |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 3096836d8bd3..c9f3dc4fd3ee 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file *file) | |||
1259 | set_current_state(TASK_UNINTERRUPTIBLE); | 1259 | set_current_state(TASK_UNINTERRUPTIBLE); |
1260 | if (pp->cmd.status != 1) | 1260 | if (pp->cmd.status != 1) |
1261 | break; | 1261 | break; |
1262 | spin_lock_irqsave(&pp->lock, flags); | ||
1263 | schedule(); | ||
1264 | spin_unlock_irqrestore(&pp->lock, flags); | 1262 | spin_unlock_irqrestore(&pp->lock, flags); |
1263 | schedule(); | ||
1264 | spin_lock_irqsave(&pp->lock, flags); | ||
1265 | } | 1265 | } |
1266 | set_current_state(TASK_RUNNING); | 1266 | set_current_state(TASK_RUNNING); |
1267 | remove_wait_queue(&pp->wait, &wait); | 1267 | remove_wait_queue(&pp->wait, &wait); |
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 220abce63e4a..b10211c420ef 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
@@ -77,7 +77,7 @@ static void s3c24xx_spi_chipsel(struct spi_device *spi, int value) | |||
77 | 77 | ||
78 | switch (value) { | 78 | switch (value) { |
79 | case BITBANG_CS_INACTIVE: | 79 | case BITBANG_CS_INACTIVE: |
80 | hw->pdata->set_cs(hw->pdata, spi->chip_select, cspol^1); | 80 | hw->set_cs(hw->pdata, spi->chip_select, cspol^1); |
81 | break; | 81 | break; |
82 | 82 | ||
83 | case BITBANG_CS_ACTIVE: | 83 | case BITBANG_CS_ACTIVE: |
@@ -98,7 +98,7 @@ static void s3c24xx_spi_chipsel(struct spi_device *spi, int value) | |||
98 | /* write new configration */ | 98 | /* write new configration */ |
99 | 99 | ||
100 | writeb(spcon, hw->regs + S3C2410_SPCON); | 100 | writeb(spcon, hw->regs + S3C2410_SPCON); |
101 | hw->pdata->set_cs(hw->pdata, spi->chip_select, cspol); | 101 | hw->set_cs(hw->pdata, spi->chip_select, cspol); |
102 | 102 | ||
103 | break; | 103 | break; |
104 | } | 104 | } |