svn commit: r310062 - stable/10/sys/dev/smbus
Andriy Gapon
avg at FreeBSD.org
Wed Dec 14 15:38:29 UTC 2016
Author: avg
Date: Wed Dec 14 15:38:28 2016
New Revision: 310062
URL: https://svnweb.freebsd.org/changeset/base/310062
Log:
make smbus_get_addr() an ivar accessor
This is a direct commit to this branch.
smbus_get_addr() was declared as a funciton prototype, but the function
was never defined. read_ivar and write_ivar methods were unused.
This was exposed after jedec_ts driver was imported to this branch
as that driver turned out to be the first user of smbus_get_addr().
This change is a small subset of a larger change in r281985.
Reported by: jhb
Pointyhat to: avg
Modified:
stable/10/sys/dev/smbus/smbconf.h
Modified: stable/10/sys/dev/smbus/smbconf.h
==============================================================================
--- stable/10/sys/dev/smbus/smbconf.h Wed Dec 14 15:00:24 2016 (r310061)
+++ stable/10/sys/dev/smbus/smbconf.h Wed Dec 14 15:38:28 2016 (r310062)
@@ -74,7 +74,9 @@
/*
* ivars codes
*/
-#define SMBUS_IVAR_ADDR 0x1 /* slave address of the device */
+enum smbus_ivars {
+ SMBUS_IVAR_ADDR, /* slave address of the device */
+};
int smbus_request_bus(device_t, device_t, int);
int smbus_release_bus(device_t, device_t);
@@ -83,7 +85,12 @@ int smbus_error(int error);
void smbus_intr(device_t, u_char, char low, char high, int error);
-u_char smbus_get_addr(device_t);
+#define SMBUS_ACCESSOR(var, ivar, type) \
+ __BUS_ACCESSOR(smbus, var, SMBUS, ivar, type)
+
+SMBUS_ACCESSOR(addr, ADDR, int)
+
+#undef SMBUS_ACCESSOR
extern driver_t smbus_driver;
extern devclass_t smbus_devclass;
More information about the svn-src-all
mailing list