]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
hwmon: (pmbus) associate PMBUS_SKIP_STATUS_CHECK with driver data
authorXiaoting Liu <xiaoting.liu@hxt-semitech.com>
Thu, 10 Jan 2019 02:18:20 +0000 (10:18 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 18 Feb 2019 22:23:29 +0000 (14:23 -0800)
commit6f4a46f0eb5e7a58be38284c7124ad8b96298b35
tree7f550c106526ba02c2c7c6533ab9915fd7bcfb11
parentc947e51cf8038ab05674931c189f2bfa8fd48d83
hwmon: (pmbus) associate PMBUS_SKIP_STATUS_CHECK with driver data

Current code compares device name with name in i2c_device_id to decide
whether PMBUS_SKIP_STATUS_CHECK should be set in pmbus_platform_data,
which makes adding new devices with PMBUS_SKIP_STATUS_CHECK should also
modify code in pmbus_probe().

This patch adds pmbus_device_info to save pages and flags. Its pointer
is put in driver_data of i2c_device_id, which makes adding new device
more straightforward.

Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com>
Signed-off-by: Xiaoting Liu <xiaoting.liu@hxt-semitech.com>
[groeck: Use designated structure initializers to improve readability]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus.c