Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6

* 'merge' of git://git.secretlab.ca/git/linux-2.6:
spi/mpc52xx-spi: fix annotation for remove()-pointer
spi/fsl_espi: fix wrong setting of the address in the command buffer
spi/fsl_espi: change the read behaviour of the SPIRF
of/i2c: Fix request module by alias
powerpc/mpc5200: include fs.h in mpc52xx_gpt.c

+28 -12
+1
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
··· 63 63 #include <linux/of_gpio.h> 64 64 #include <linux/kernel.h> 65 65 #include <linux/slab.h> 66 + #include <linux/fs.h> 66 67 #include <linux/watchdog.h> 67 68 #include <linux/miscdevice.h> 68 69 #include <linux/uaccess.h>
+1 -1
drivers/of/of_i2c.c
··· 61 61 info.of_node = of_node_get(node); 62 62 info.archdata = &dev_ad; 63 63 64 - request_module("%s", info.type); 64 + request_module("%s%s", I2C_MODULE_PREFIX, info.type); 65 65 66 66 result = i2c_new_device(adap, &info); 67 67 if (result == NULL) {
+1 -1
drivers/spi/mpc52xx_spi.c
··· 563 563 .of_match_table = mpc52xx_spi_match, 564 564 }, 565 565 .probe = mpc52xx_spi_probe, 566 - .remove = __exit_p(mpc52xx_spi_remove), 566 + .remove = __devexit_p(mpc52xx_spi_remove), 567 567 }; 568 568 569 569 static int __init mpc52xx_spi_init(void)
+25 -10
drivers/spi/spi_fsl_espi.c
··· 258 258 return mpc8xxx_spi->count; 259 259 } 260 260 261 - static void fsl_espi_addr2cmd(unsigned int addr, u8 *cmd) 261 + static inline void fsl_espi_addr2cmd(unsigned int addr, u8 *cmd) 262 262 { 263 - if (cmd[1] && cmd[2] && cmd[3]) { 263 + if (cmd) { 264 264 cmd[1] = (u8)(addr >> 16); 265 265 cmd[2] = (u8)(addr >> 8); 266 266 cmd[3] = (u8)(addr >> 0); 267 267 } 268 268 } 269 269 270 - static unsigned int fsl_espi_cmd2addr(u8 *cmd) 270 + static inline unsigned int fsl_espi_cmd2addr(u8 *cmd) 271 271 { 272 - if (cmd[1] && cmd[2] && cmd[3]) 272 + if (cmd) 273 273 return cmd[1] << 16 | cmd[2] << 8 | cmd[3] << 0; 274 274 275 275 return 0; ··· 395 395 } 396 396 } 397 397 398 - addr = fsl_espi_cmd2addr(local_buf); 399 - addr += pos; 400 - fsl_espi_addr2cmd(addr, local_buf); 398 + if (pos > 0) { 399 + addr = fsl_espi_cmd2addr(local_buf); 400 + addr += pos; 401 + fsl_espi_addr2cmd(addr, local_buf); 402 + } 401 403 402 404 espi_trans->n_tx = n_tx; 403 405 espi_trans->n_rx = trans_len; ··· 509 507 510 508 /* We need handle RX first */ 511 509 if (events & SPIE_NE) { 512 - u32 rx_data; 510 + u32 rx_data, tmp; 511 + u8 rx_data_8; 513 512 514 513 /* Spin until RX is done */ 515 514 while (SPIE_RXCNT(events) < min(4, mspi->len)) { 516 515 cpu_relax(); 517 516 events = mpc8xxx_spi_read_reg(&reg_base->event); 518 517 } 519 - mspi->len -= 4; 520 518 521 - rx_data = mpc8xxx_spi_read_reg(&reg_base->receive); 519 + if (mspi->len >= 4) { 520 + rx_data = mpc8xxx_spi_read_reg(&reg_base->receive); 521 + } else { 522 + tmp = mspi->len; 523 + rx_data = 0; 524 + while (tmp--) { 525 + rx_data_8 = in_8((u8 *)&reg_base->receive); 526 + rx_data |= (rx_data_8 << (tmp * 8)); 527 + } 528 + 529 + rx_data <<= (4 - mspi->len) * 8; 530 + } 531 + 532 + mspi->len -= 4; 522 533 523 534 if (mspi->rx) 524 535 mspi->get_rx(rx_data, mspi);