Commit 3a3438e5 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Wolfram Sang

platform/x86: intel_cht_int33fe_microb: Constify the software node

Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent dc317fb8
...@@ -35,6 +35,10 @@ static const struct property_entry bq27xxx_props[] = { ...@@ -35,6 +35,10 @@ static const struct property_entry bq27xxx_props[] = {
{ } { }
}; };
static const struct software_node bq27xxx_node = {
.properties = bq27xxx_props,
};
int cht_int33fe_microb_probe(struct cht_int33fe_data *data) int cht_int33fe_microb_probe(struct cht_int33fe_data *data)
{ {
struct device *dev = data->dev; struct device *dev = data->dev;
...@@ -43,7 +47,7 @@ int cht_int33fe_microb_probe(struct cht_int33fe_data *data) ...@@ -43,7 +47,7 @@ int cht_int33fe_microb_probe(struct cht_int33fe_data *data)
memset(&board_info, 0, sizeof(board_info)); memset(&board_info, 0, sizeof(board_info));
strscpy(board_info.type, "bq27542", ARRAY_SIZE(board_info.type)); strscpy(board_info.type, "bq27542", ARRAY_SIZE(board_info.type));
board_info.dev_name = "bq27542"; board_info.dev_name = "bq27542";
board_info.properties = bq27xxx_props; board_info.swnode = &bq27xxx_node;
data->battery_fg = i2c_acpi_new_device(dev, 1, &board_info); data->battery_fg = i2c_acpi_new_device(dev, 1, &board_info);
return PTR_ERR_OR_ZERO(data->battery_fg); return PTR_ERR_OR_ZERO(data->battery_fg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment