hwmon.c (f72222c74bd642182cc892c99df65cb105c61193) | hwmon.c (c95df1ae69b85d5f306d86164e245aae614b852a) |
---|---|
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 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; version 2 of the License. 11*/ 12 | 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 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; version 2 of the License. 11*/ 12 |
13#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 14 |
|
13#include <linux/module.h> 14#include <linux/device.h> 15#include <linux/err.h> 16#include <linux/kdev_t.h> 17#include <linux/idr.h> 18#include <linux/hwmon.h> 19#include <linux/gfp.h> 20#include <linux/spinlock.h> --- 93 unchanged lines hidden (view full) --- 114} 115 116static int __init hwmon_init(void) 117{ 118 hwmon_pci_quirks(); 119 120 hwmon_class = class_create(THIS_MODULE, "hwmon"); 121 if (IS_ERR(hwmon_class)) { | 15#include <linux/module.h> 16#include <linux/device.h> 17#include <linux/err.h> 18#include <linux/kdev_t.h> 19#include <linux/idr.h> 20#include <linux/hwmon.h> 21#include <linux/gfp.h> 22#include <linux/spinlock.h> --- 93 unchanged lines hidden (view full) --- 116} 117 118static int __init hwmon_init(void) 119{ 120 hwmon_pci_quirks(); 121 122 hwmon_class = class_create(THIS_MODULE, "hwmon"); 123 if (IS_ERR(hwmon_class)) { |
122 printk(KERN_ERR "hwmon.c: couldn't create sysfs class\n"); | 124 pr_err("couldn't create sysfs class\n"); |
123 return PTR_ERR(hwmon_class); 124 } 125 return 0; 126} 127 128static void __exit hwmon_exit(void) 129{ 130 class_destroy(hwmon_class); --- 12 unchanged lines hidden --- | 125 return PTR_ERR(hwmon_class); 126 } 127 return 0; 128} 129 130static void __exit hwmon_exit(void) 131{ 132 class_destroy(hwmon_class); --- 12 unchanged lines hidden --- |