Re: [patch] Disable PMBus status check for DPS400 PSU controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/21/2016 07:08 AM, Vadim Pasternak wrote:

[ ... ]

   };

diff --git a/drivers/hwmon/pmbus/pmbus_core.c
b/drivers/hwmon/pmbus/pmbus_core.c
index ba59eae..3d98070 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -1931,8 +1931,11 @@ EXPORT_SYMBOL_GPL(pmbus_do_probe);
   int pmbus_do_remove(struct i2c_client *client)
   {
   	struct pmbus_data *data = i2c_get_clientdata(client);
+	const struct pmbus_platform_data *pdata =
+				dev_get_platdata(&client->dev);
   	hwmon_device_unregister(data->hwmon_dev);
   	kfree(data->group.attrs);
+	kfree(pdata);

So, if I use in allocation
                pdata = devm_kzalloc(&client->dev,
                                     sizeof(struct pmbus_platform_data),
                                     GFP_KERNEL);
I also can drop the above three lines, right?


Correct.

Guenter

--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux