lkml.org 
[lkml]   [2013]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [tpmdd-devel] [PATCH 06/13] tpm: Remove redundant dev_set_drvdata
    From
    Date
    On Mon, 2013-09-23 at 12:14 -0600, Jason Gunthorpe wrote:
    > TPM drivers should not call dev_set_drvdata (or aliases), only the core
    > code is allowed to call dev_set_drvdata, and it does it during
    > tpm_register_hardware.
    >
    > These extra sets are harmless, but are an anti-pattern that many drivers
    > have copied.
    >
    > Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>

    > diff --git a/drivers/char/tpm/tpm_spi_stm_st33.c b/drivers/char/tpm/tpm_spi_stm_st33.c
    > index 8d3e8e2..f5e3cd6 100644
    > --- a/drivers/char/tpm/tpm_spi_stm_st33.c
    > +++ b/drivers/char/tpm/tpm_spi_stm_st33.c
    > @@ -779,7 +779,6 @@ tpm_st33_spi_probe(struct spi_device *dev)
    > tpm_get_timeouts(chip);
    >
    > /* attach chip datas to client */
    Looks good except this comment needs to be removed. Since this driver
    is not merged, please remove this line in the new driver.

    > - spi_set_drvdata(dev, chip);
    > platform_data->bchipf = false;
    >

    Acked-by: Ashley Lai <adlai@linux.vnet.ibm.com>

    Thanks,
    --Ashley Lai




    \
     
     \ /
      Last update: 2013-10-05 04:21    [W:3.264 / U:0.600 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site