forked from shenki/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hwmon: (occ) Move common code to a separate module
Instead of duplicating the common code into the 2 (binary) drivers, move the common code to a separate module. This is cleaner. Signed-off-by: Jean Delvare <[email protected]> Cc: Eddie James <[email protected]> Cc: Guenter Roeck <[email protected]> Reviewed-by: Eddie James <[email protected]> Tested-by: Eddie James <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
- Loading branch information
Showing
4 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
occ-p8-hwmon-objs := common.o sysfs.o p8_i2c.o | ||
occ-p9-hwmon-objs := common.o sysfs.o p9_sbe.o | ||
occ-hwmon-common-objs := common.o sysfs.o | ||
occ-p8-hwmon-objs := p8_i2c.o | ||
occ-p9-hwmon-objs := p9_sbe.o | ||
|
||
obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o | ||
obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o | ||
obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,13 @@ | |
// Copyright IBM Corp 2019 | ||
|
||
#include <linux/device.h> | ||
#include <linux/export.h> | ||
#include <linux/hwmon.h> | ||
#include <linux/hwmon-sysfs.h> | ||
#include <linux/jiffies.h> | ||
#include <linux/kernel.h> | ||
#include <linux/math64.h> | ||
#include <linux/module.h> | ||
#include <linux/mutex.h> | ||
#include <linux/sysfs.h> | ||
#include <asm/unaligned.h> | ||
|
@@ -1099,3 +1101,8 @@ int occ_setup(struct occ *occ, const char *name) | |
|
||
return rc; | ||
} | ||
EXPORT_SYMBOL_GPL(occ_setup); | ||
|
||
MODULE_AUTHOR("Eddie James <[email protected]>"); | ||
MODULE_DESCRIPTION("Common OCC hwmon code"); | ||
MODULE_LICENSE("GPL"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters