[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-arm-kernel
Subject: Freescale iMX SPI controller driver (kernel 2.6.21.1)
From: Mohan <camilo.id () gmail ! com>
Date: 2007-05-31 6:33:26
Message-ID: 9f01c21d0705302333y6c599154tb50335f595025bb5 () mail ! gmail ! com
[Download RAW message or body]
Dear Andrea
This is regarding the drivers/spi/spi_imx.c in the 2.6.20.1 mainline Linux
kernel.
@line 124
>/* SPI DMA Register Bit Fields & Masks */
>#define SPI_DMA_RHDMA (0xF << 4) /* RXFIFO Half Status */
It looks like it needs to be
>#define SPI_DMA_RHDMA (0x1 << 4) /* RXFIFO Half Status */
^
according to the data sheet, please correct me if I am wrong.
Also in the function 'static int setup(struct spi_device *spi)'
@line 1360
>......
> spi_speed_hz(SPI_CONTROL_DATARATE_MIN),
> spi->max_speed_hz);
>
>err_first_setup:
> kfree(chip);
> return status;
>}
I feel there should be a "return 0;" before the 'err_first_setup:'
>......
> spi_speed_hz(SPI_CONTROL_DATARATE_MIN),
> spi->max_speed_hz);
>
>return 0; // Is this not needed here ?
>
>err_first_setup:
> kfree(chip);
> return status;
>}
It seems to be kfeeing *chip irrespective of successfully setup or not.. It
is quite likely that I am mistaken
as I am very new to this kernel thing. But please humour me.
Any suggestion would be very welcome.
Regards,
Mohan
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic