u64 val;
addr += idx;
- if ((idx == KP_SPI_REG_CONFIG) && (cs->conf_cache >= 0)){
+ if ((idx == KP_SPI_REG_CONFIG) && (cs->conf_cache >= 0)) {
return cs->conf_cache;
}
val = readq(addr);
processed++;
}
}
- else if(rx) {
+ else if (rx) {
for (i = 0 ; i < c ; i++) {
- char test=0;
+ char test = 0;
kp_spi_write_reg(cs, KP_SPI_REG_TXDATA, 0x00);
cs = spidev->controller_state;
if (!cs) {
cs = kzalloc(sizeof(*cs), GFP_KERNEL);
- if(!cs) {
+ if (!cs) {
return -ENOMEM;
}
cs->base = kpspi->base;
if (transfer->bits_per_word) {
word_len = transfer->bits_per_word;
}
- sc.bitfield.wl = word_len-1;
+ sc.bitfield.wl = word_len - 1;
/* ...chip select */
sc.bitfield.cs = spidev->chip_select;
int i;
drvdata = pldev->dev.platform_data;
- if (!drvdata){
+ if (!drvdata) {
dev_err(&pldev->dev, "kp_spi_probe: platform_data is NULL!\n");
return -ENODEV;
}
spi_new_device(master, &(table[i])); \
}
- switch ((drvdata->card_id & 0xFFFF0000) >> 16){
+ switch ((drvdata->card_id & 0xFFFF0000) >> 16) {
case PCI_DEVICE_ID_DAKTRONICS_KADOKA_P2KR0:
NEW_SPI_DEVICE_FROM_BOARD_INFO_TABLE(p2kr0_board_info);
break;