diff --git a/Makefile b/Makefile index ac48799..dfa447c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,9 @@ # Derived from the good-ole LDD3 Makefile # -ccflags-y += -Wall -Werror -Wunused-macros +CONFIG_MODULE_SIG=n + +ccflags-y += -Wall -Werror -Wunused-macros -Wno-implicit-fallthrough # To build modules outside of the kernel tree, we run "make" # in the kernel source tree; the Makefile these then includes this diff --git a/mcp2210-irq.c b/mcp2210-irq.c index cd3ef07..fe4743a 100644 --- a/mcp2210-irq.c +++ b/mcp2210-irq.c @@ -99,7 +99,7 @@ int mcp2210_irq_probe(struct mcp2210_device *dev) for (i = 0; i < dev->nr_irqs; ++i) { int virq = dev->irq_base + i; - dev->irq_descs[i] = irq_to_desc(virq); + dev->irq_descs[i] = irq_data_to_desc( irq_get_irq_data(virq)); BUG_ON(!dev->irq_descs[i]); irq_set_chip_data(virq, dev); irq_set_chip(virq, &mcp2210_irq_chip); diff --git a/mcp2210-lib.c b/mcp2210-lib.c index 7ef6a35..30f07f9 100644 --- a/mcp2210-lib.c +++ b/mcp2210-lib.c @@ -1924,7 +1924,7 @@ void dump_spi_transfer(const char *level, unsigned indent, const char *start, "%s .rx_dma = %pad\n" "%s .cs_change = %u\n" "%s .bits_per_word = %hhu\n" - "%s .delay_usecs = %hu\n" + "%s .word_delay_usecs = %hu\n" "%s .speed_hz = %u\n" "%s .transfer_list = {.next = %p, .prev = %p}\n" "%s}\n", @@ -1936,7 +1936,7 @@ void dump_spi_transfer(const char *level, unsigned indent, const char *start, ind, &xfer->tx_dma, ind, xfer->cs_change, ind, xfer->bits_per_word, - ind, xfer->delay_usecs, + ind, xfer->word_delay.value, ind, xfer->speed_hz, ind, xfer->transfer_list.next, xfer->transfer_list.prev, ind); diff --git a/mcp2210-spi.c b/mcp2210-spi.c index 21b2c9d..223a8ae 100644 --- a/mcp2210-spi.c +++ b/mcp2210-spi.c @@ -38,7 +38,7 @@ # define USE_SPI_QUEUE 1 #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,8,0) # define HAVE_SPI_CS_GPIO 1 #endif diff --git a/user/mcp2210.c b/user/mcp2210.c index 213c888..46fa604 100644 --- a/user/mcp2210.c +++ b/user/mcp2210.c @@ -557,7 +557,7 @@ static int eeprom_write(int argc, char *argv[]) { static int eeprom_read_write(int is_read, int argc, char *argv[]) { struct mcp2210_ioctl_data *data; struct mcp2210_ioctl_data_eeprom *eeprom; - const size_t struct_size = IOCTL_DATA_EEPROM_SIZE + 0x100; + const size_t struct_size = sizeof(struct mcp2210_ioctl_data); uint addr = 0; uint size = 0; int i;