[PATCH] spi/imx: simplify error handling to free gpios

2011-12-04 Thread Axel Lin
Simplify the error handling by moving the code to free gpios in one place. Signed-off-by: Axel Lin axel@gmail.com --- drivers/spi/spi-imx.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index c6e697f..31054e3

[PATCH] spi: use gpio_request_one() instead of spi_gpio_alloc() helper function

2011-12-04 Thread Axel Lin
Signed-off-by: Axel Lin axel@gmail.com --- drivers/spi/spi-gpio.c | 21 - 1 files changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index e093d3e..85c2eca 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi

Re: [PATCH] spi: use gpio_request_one() instead of spi_gpio_alloc() helper function

2011-12-07 Thread Axel Lin
2011/12/8 Wolfram Sang w.s...@pengutronix.de: On Mon, Dec 05, 2011 at 03:50:47PM +0800, Axel Lin wrote: Signed-off-by: Axel Lin axel@gmail.com This will make the driver depend on GPIOLIB, currently it depends only on GENERIC_GPIO. That needs to be addressed and made sure it won't cause

[PATCH] spi: Convert to DEFINE_PCI_DEVICE_TABLE

2011-12-14 Thread Axel Lin
Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE tables. Signed-off-by: Axel Lin axel@gmail.com --- drivers/spi/spi-dw-pci.c |2 +- drivers/spi/spi-pxa2xx-pci.c |2 +- drivers/spi/spi-topcliff-pch.c |2 +- 3 files changed, 3 insertions(+), 3

[PATCH RESEND] spi/imx: simplify error handling to free gpios

2012-01-09 Thread Axel Lin
Simplify the error handling by moving the code to free gpios in one place. Signed-off-by: Axel Lin axel@gmail.com Acked-by: Shawn Guo shawn@linaro.org --- drivers/spi/spi-imx.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-imx.c b

[PATCH RFT] spi: spi-xcomm: Fix wrong setting for SPI_XCOMM_SETTINGS_CPHA

2012-12-03 Thread Axel Lin
The logic of setting SPI_XCOMM_SETTINGS_CPHA bit is reversed. Signed-off-by: Axel Lin axel@ingics.com --- Hi Lars, The logic of setting SPI_XCOMM_SETTINGS_CPHA bit looks wrong to me. Can you check if this patch works? Thanks, Axel drivers/spi/spi-xcomm.c |4 ++-- 1 file changed, 2

[PATCH] spi: tle620x: add missing device_remove_file()

2011-05-11 Thread Axel Lin
This patch includes below fixes: 1. Add missing device_remove_file for dev_attr_status_show in tle62x0_remove. 2. Fix tle62x0_probe error handling: Currently, if the error happens when ptr 0, gpio_attrs[0] is not properly remove. Signed-off-by: Axel Lin axel@gmail.com --- drivers/spi

[PATCH 1/2] spi: spi_sh: calling spi_unregister_master instead of spi_master_put in spi_sh_remove

2011-05-11 Thread Axel Lin
spi_master_put() should only be used in error handling. Once spi_register_master() returns success, we should call spi_unregister_master() instead. Signed-off-by: Axel Lin axel@gmail.com --- drivers/spi/spi_sh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 2/2] spi: spi_tegra: calling spi_unregister_master instead of spi_master_put in spi_tegra_remove

2011-05-11 Thread Axel Lin
spi_master_put() should only be used in error handling. Once spi_register_master() returns success, we should call spi_unregister_master() instead. Signed-off-by: Axel Lin axel@gmail.com --- drivers/spi/spi_tegra.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 1/2] spi: spi_nuc900: Use spi_bitbang_stop instead of spi_unregister_master in nuc900_spi_remove

2011-05-14 Thread Axel Lin
Calling spi_bitbang_stop() will also destroy bitbang-workqueue, which is created by calling spi_bitbang_start() in nuc900_spi_probe(). Signed-off-by: Axel Lin axel@gmail.com --- drivers/spi/spi_nuc900.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi

[PATCH 2/2] spi: spi_s3c24xx: Use spi_bitbang_stop instead of spi_unregister_master in s3c24xx_spi_remove

2011-05-14 Thread Axel Lin
Calling spi_bitbang_stop() will also destroy bitbang-workqueue, which is created by calling spi_bitbang_start() in s3c24xx_spi_probe(). Signed-off-by: Axel Lin axel@gmail.com --- drivers/spi/spi_s3c24xx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/spi

[PATCH] spi: omap2-mcspi: fix omap2_mcspi_probe error handling

2011-06-22 Thread Axel Lin
This patch includes below fixes for error handling: 1. return proper error if kcalloc for mcspi-dma_channels fails 2. return proper error if omap2_mcspi_master_setup fails 3. properly release allocated resources in error paths and improve the naming of goto labels. Signed-off-by: Axel Lin axel

Re: [PATCH] spi: omap2-mcspi: fix omap2_mcspi_probe error handling

2011-06-26 Thread Axel Lin
2011/6/22 Grant Likely grant.lik...@secretlab.ca: On Wed, Jun 22, 2011 at 7:57 AM, Axel Lin axel@gmail.com wrote: This patch includes below fixes for error handling: 1. return proper error if kcalloc for mcspi-dma_channels fails 2. return proper error if omap2_mcspi_master_setup fails 3

[PATCH RESEND] spi: omap2-mcspi: fix omap2_mcspi_probe error handling

2011-08-10 Thread Axel Lin
This patch includes below fixes for error handling: 1. return proper error if kcalloc for mcspi-dma_channels fails 2. return proper error if omap2_mcspi_master_setup fails 3. properly release allocated resources in error paths and improve the naming of goto labels. Signed-off-by: Axel Lin axel