08 Dec, 2015

2 commits

  • Using pr_* macros are more prefferable than using printk. Start using
    pr_* family of macros and define pr_fmt to be used with it.
    While at it remove DRVNAME from an existing pr_info() as the name is now
    being printed by pr_fmt.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Mark Brown

    Sudip Mukherjee
     
  • As we have a struct device available it is better to use dev_warn()
    instead of printk.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Mark Brown

    Sudip Mukherjee
     

04 Dec, 2015

6 commits


22 Dec, 2014

1 commit


17 Sep, 2013

1 commit

  • Many drivers that use bitbang library have a leak on probe error paths.
    This is because once a spi_master_get() call succeeds, we need an additional
    spi_master_put() call to free the memory.

    Fix this issue by moving the code taking a reference to master to
    spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
    success. With this change, the caller is responsible for calling
    spi_bitbang_stop() to decrement the reference and spi_master_put() as
    counterpart of spi_alloc_master() to prevent a memory leak.

    So now we have below patten for drivers using bitbang library:

    probe:
    spi_alloc_master -> Init reference count to 1
    spi_bitbang_start -> Increment reference count
    remove:
    spi_bitbang_stop -> Decrement reference count
    spi_master_put -> Decrement reference count (reference count reaches 0)

    Fixup all users accordingly.

    Signed-off-by: Axel Lin
    Suggested-by: Uwe Kleine-Koenig
    Acked-by: Uwe Kleine-Koenig
    Signed-off-by: Mark Brown

    Axel Lin
     

20 May, 2012

1 commit


06 Jun, 2011

1 commit

  • Sort the SPI makefile and enforce the naming convention spi_*.c for
    spi drivers.

    This change also rolls the contents of atmel_spi.h into the .c file
    since there is only one user of that particular include file.

    v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be
    be the predominant pattern for subsystem prefixes.
    - Clean up filenames in Kconfig and header comment blocks

    Signed-off-by: Grant Likely
    Acked-by: Wolfram Sang
    Acked-by: Linus Walleij

    Grant Likely