]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/hwmon/lm95241.c
Merge tag 'sound-fix-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[linux.git] / drivers / hwmon / lm95241.c
index 3ff1889371586c876ae7a529b17e9693d79f1401..8d66d6e3c0fc6f23240734b7a69b645320cfd7ab 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2008, 2010 Davide Rizzo <elpa.rizzo@gmail.com>
  *
@@ -5,16 +6,6 @@
  * It reports up to three temperatures (its own plus up to two external ones).
  * Complete datasheet can be obtained from National's website at:
  *   http://www.national.com/ds.cgi/LM/LM95241.pdf
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #include <linux/bitops.h>
@@ -418,33 +409,15 @@ static void lm95241_init_client(struct i2c_client *client,
                                  data->model);
 }
 
-static const u32 lm95241_chip_config[] = {
-       HWMON_C_UPDATE_INTERVAL,
-       0
-};
-
-static const struct hwmon_channel_info lm95241_chip = {
-       .type = hwmon_chip,
-       .config = lm95241_chip_config,
-};
-
-static const u32 lm95241_temp_config[] = {
-       HWMON_T_INPUT,
-       HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MIN | HWMON_T_TYPE |
-               HWMON_T_FAULT,
-       HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MIN | HWMON_T_TYPE |
-               HWMON_T_FAULT,
-       0
-};
-
-static const struct hwmon_channel_info lm95241_temp = {
-       .type = hwmon_temp,
-       .config = lm95241_temp_config,
-};
-
 static const struct hwmon_channel_info *lm95241_info[] = {
-       &lm95241_chip,
-       &lm95241_temp,
+       HWMON_CHANNEL_INFO(chip,
+                          HWMON_C_UPDATE_INTERVAL),
+       HWMON_CHANNEL_INFO(temp,
+                          HWMON_T_INPUT,
+                          HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MIN |
+                          HWMON_T_TYPE | HWMON_T_FAULT,
+                          HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MIN |
+                          HWMON_T_TYPE | HWMON_T_FAULT),
        NULL
 };