summaryrefslogtreecommitdiff
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/therm_windtunnel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index 61fe2ab910b8..b8228ca40454 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -317,19 +317,21 @@ static void do_attach(struct i2c_adapter *adapter)
if (x.running || strncmp(adapter->name, "uni-n", 5))
return;
+ of_node_get(adapter->dev.of_node);
np = of_find_compatible_node(adapter->dev.of_node, NULL, "MAC,ds1775");
if (np) {
of_node_put(np);
} else {
- strlcpy(info.type, "MAC,ds1775", I2C_NAME_SIZE);
+ strscpy(info.type, "MAC,ds1775", I2C_NAME_SIZE);
i2c_new_scanned_device(adapter, &info, scan_ds1775, NULL);
}
+ of_node_get(adapter->dev.of_node);
np = of_find_compatible_node(adapter->dev.of_node, NULL, "MAC,adm1030");
if (np) {
of_node_put(np);
} else {
- strlcpy(info.type, "MAC,adm1030", I2C_NAME_SIZE);
+ strscpy(info.type, "MAC,adm1030", I2C_NAME_SIZE);
i2c_new_scanned_device(adapter, &info, scan_adm1030, NULL);
}
}