hwmon.c (74d3b6419772e49563877b9a3c502b763d24b075) hwmon.c (319fe159889a06b47a2621a1201c813502b7a842)
1/*
2 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring
3 *
4 * This file defines the sysfs class "hwmon", for use by sensors drivers.
5 *
6 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 594 unchanged lines hidden (view full) ---

603 hdev->of_node = dev ? dev->of_node : NULL;
604 hwdev->chip = chip;
605 dev_set_drvdata(hdev, drvdata);
606 dev_set_name(hdev, HWMON_ID_FORMAT, id);
607 err = device_register(hdev);
608 if (err)
609 goto free_hwmon;
610
1/*
2 * hwmon.c - part of lm_sensors, Linux kernel modules for hardware monitoring
3 *
4 * This file defines the sysfs class "hwmon", for use by sensors drivers.
5 *
6 * Copyright (C) 2005 Mark M. Hoffman <mhoffman@lightlink.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 594 unchanged lines hidden (view full) ---

603 hdev->of_node = dev ? dev->of_node : NULL;
604 hwdev->chip = chip;
605 dev_set_drvdata(hdev, drvdata);
606 dev_set_name(hdev, HWMON_ID_FORMAT, id);
607 err = device_register(hdev);
608 if (err)
609 goto free_hwmon;
610
611 if (chip && chip->ops->read &&
611 if (dev && chip && chip->ops->read &&
612 chip->info[0]->type == hwmon_chip &&
613 (chip->info[0]->config[0] & HWMON_C_REGISTER_TZ)) {
614 const struct hwmon_channel_info **info = chip->info;
615
616 for (i = 1; info[i]; i++) {
617 if (info[i]->type != hwmon_temp)
618 continue;
619

--- 267 unchanged lines hidden ---
612 chip->info[0]->type == hwmon_chip &&
613 (chip->info[0]->config[0] & HWMON_C_REGISTER_TZ)) {
614 const struct hwmon_channel_info **info = chip->info;
615
616 for (i = 1; info[i]; i++) {
617 if (info[i]->type != hwmon_temp)
618 continue;
619

--- 267 unchanged lines hidden ---