mirror of https://gitee.com/openkylin/linux.git
i2c: i801: Simplify initialization of i2c_board_info in i801_probe_optional_slaves
Why shall we bother to open-code something that the compiler can do for us. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
44c54c4ec3
commit
8d83973e7a
|
@ -1289,11 +1289,11 @@ static void i801_probe_optional_slaves(struct i801_priv *priv)
|
|||
return;
|
||||
|
||||
if (apanel_addr) {
|
||||
struct i2c_board_info info;
|
||||
struct i2c_board_info info = {
|
||||
.addr = apanel_addr,
|
||||
.type = "fujitsu_apanel",
|
||||
};
|
||||
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
info.addr = apanel_addr;
|
||||
strlcpy(info.type, "fujitsu_apanel", I2C_NAME_SIZE);
|
||||
i2c_new_client_device(&priv->adapter, &info);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue