Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to qemu-2.6.
[kvmfornfv.git]
/
qemu
/
hw
/
misc
/
tmp105.c
diff --git
a/qemu/hw/misc/tmp105.c
b/qemu/hw/misc/tmp105.c
index
f3fe8b8
..
f5c2472
100644
(file)
--- a/
qemu/hw/misc/tmp105.c
+++ b/
qemu/hw/misc/tmp105.c
@@
-18,9
+18,11
@@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/i2c/i2c.h"
#include "tmp105.h"
#include "hw/hw.h"
#include "hw/i2c/i2c.h"
#include "tmp105.h"
+#include "qapi/error.h"
#include "qapi/visitor.h"
static void tmp105_interrupt_update(TMP105State *s)
#include "qapi/visitor.h"
static void tmp105_interrupt_update(TMP105State *s)
@@
-52,26
+54,26
@@
static void tmp105_alarm_update(TMP105State *s)
tmp105_interrupt_update(s);
}
tmp105_interrupt_update(s);
}
-static void tmp105_get_temperature(Object *obj, Visitor *v,
void *opaqu
e,
-
const char *nam
e, Error **errp)
+static void tmp105_get_temperature(Object *obj, Visitor *v,
const char *nam
e,
+
void *opaqu
e, Error **errp)
{
TMP105State *s = TMP105(obj);
int64_t value = s->temperature * 1000 / 256;
{
TMP105State *s = TMP105(obj);
int64_t value = s->temperature * 1000 / 256;
- visit_type_int(v,
&value, nam
e, errp);
+ visit_type_int(v,
name, &valu
e, errp);
}
/* Units are 0.001 centigrades relative to 0 C. s->temperature is 8.8
* fixed point, so units are 1/256 centigrades. A simple ratio will do.
*/
}
/* Units are 0.001 centigrades relative to 0 C. s->temperature is 8.8
* fixed point, so units are 1/256 centigrades. A simple ratio will do.
*/
-static void tmp105_set_temperature(Object *obj, Visitor *v,
void *opaqu
e,
-
const char *nam
e, Error **errp)
+static void tmp105_set_temperature(Object *obj, Visitor *v,
const char *nam
e,
+
void *opaqu
e, Error **errp)
{
TMP105State *s = TMP105(obj);
Error *local_err = NULL;
int64_t temp;
{
TMP105State *s = TMP105(obj);
Error *local_err = NULL;
int64_t temp;
- visit_type_int(v,
&temp, name
, &local_err);
+ visit_type_int(v,
name, &temp
, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
if (local_err) {
error_propagate(errp, local_err);
return;