summaryrefslogtreecommitdiff
path: root/drivers/power/supply/bq24190_charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/supply/bq24190_charger.c')
-rw-r--r--drivers/power/supply/bq24190_charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 3f99cb9590ba..1db290ee2591 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -1803,7 +1803,7 @@ static int bq24190_probe(struct i2c_client *client)
bdi->client = client;
bdi->dev = dev;
- strncpy(bdi->model_name, id->name, I2C_NAME_SIZE);
+ strscpy(bdi->model_name, id->name, sizeof(bdi->model_name));
mutex_init(&bdi->f_reg_lock);
bdi->charge_type = POWER_SUPPLY_CHARGE_TYPE_FAST;
bdi->f_reg = 0;