[lkml]   [2012]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] char/tpm: Fix compile error if CONFIG_PM is not set in tpm_i2c_infineon
    If CONFIG_PM was not set the compiler aborted with the following message:
    tpm_i2c_infineon.c:740:12: error: lvalue required as unary '&' operand

    This patch fixes this error by not defining tpm_tis_i2c_ops as NULL if
    CONFIG_PM is not set, but only setting the suspend and resume function
    pointer as NULL

    Signed-off-by: Peter Huewe <>
    Sorry for the inconvenience - now tested with and without CONFIG_PM. Sorry.

    drivers/char/tpm/tpm_i2c_infineon.c | 9 ++++-----
    1 files changed, 4 insertions(+), 5 deletions(-)

    diff --git a/drivers/char/tpm/tpm_i2c_infineon.c b/drivers/char/tpm/tpm_i2c_infineon.c
    index 1794a09..114e1a1 100644
    --- a/drivers/char/tpm/tpm_i2c_infineon.c
    +++ b/drivers/char/tpm/tpm_i2c_infineon.c
    @@ -674,16 +674,15 @@ static int tpm_tis_i2c_resume(struct device *dev)
    return tpm_pm_resume(dev);
    +#define tpm_tis_i2c_suspend NULL
    +#define tpm_tis_i2c_resume NULL

    static const struct dev_pm_ops tpm_tis_i2c_ops = {
    .suspend = tpm_tis_i2c_suspend,
    .resume = tpm_tis_i2c_resume,
    -#define tpm_tis_i2c_suspend NULL
    -#define tpm_tis_i2c_resume NULL
    -#define tpm_tis_i2c_ops NULL

    static int __devinit tpm_tis_i2c_probe(struct i2c_client *client,
    const struct i2c_device_id *id)

     \ /
      Last update: 2012-08-03 17:41    [W:0.022 / U:2.452 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site