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:
Heiner Kallweit 2021-05-25 22:01:31 +02:00 committed by Wolfram Sang
parent 44c54c4ec3
commit 8d83973e7a
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}