lkml.org 
[lkml]   [2011]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[11/70] hwmon: (pmbus) Drop check for PMBus revision register in probe function
    2.6.39-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Guenter Roeck <guenter.roeck@ericsson.com>

    commit 7f2c0662e5cfd05f12ca49109e8f787bf2d87b66 upstream.

    Some PMBus devices do not support the PMBus revision register, so don't check
    if it exists.

    Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
    Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/hwmon/pmbus_core.c | 11 +++--------
    1 file changed, 3 insertions(+), 8 deletions(-)

    --- a/drivers/hwmon/pmbus_core.c
    +++ b/drivers/hwmon/pmbus_core.c
    @@ -1518,14 +1518,9 @@ int pmbus_do_probe(struct i2c_client *cl
    i2c_set_clientdata(client, data);
    mutex_init(&data->update_lock);

    - /*
    - * Bail out if status register or PMBus revision register
    - * does not exist.
    - */
    - if (i2c_smbus_read_byte_data(client, PMBUS_STATUS_BYTE) < 0
    - || i2c_smbus_read_byte_data(client, PMBUS_REVISION) < 0) {
    - dev_err(&client->dev,
    - "Status or revision register not found\n");
    + /* Bail out if PMBus status register does not exist. */
    + if (i2c_smbus_read_byte_data(client, PMBUS_STATUS_BYTE) < 0) {
    + dev_err(&client->dev, "PMBus status register not found\n");
    ret = -ENODEV;
    goto out_data;
    }



    \
     
     \ /
      Last update: 2011-08-02 01:27    [W:4.099 / U:0.600 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site