diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-21 11:20:25 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-05-31 14:56:47 +1000 |
commit | 84ca61a2ac4512bf542ecb8a44e32bd2a2f3fbff (patch) | |
tree | 7b25d6b91d50063700623ee0b34498336a22323d | |
parent | e686362276d8471c434acf3a84cdb4e1e5656667 (diff) |
psmcomm: pass fd around instead of accessing priv->fd
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/psmcomm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/psmcomm.c b/src/psmcomm.c index ff36f06..d06b60e 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -71,7 +71,7 @@ psm_synaptics_identify(int fd, synapticshw_t * ident) #define PSM_LEVEL_NATIVE 2 static Bool -PSMQueryIsSynaptics(SynapticsPrivate *priv) +PSMQueryIsSynaptics(SynapticsPrivate *priv, int fd) { int ret; int level = PSM_LEVEL_NATIVE; @@ -81,12 +81,12 @@ PSMQueryIsSynaptics(SynapticsPrivate *priv) * Otherwise HWINFO will not return the right id * And we will need native mode anyway ... */ - SYSCALL(ret = ioctl(priv->fd, MOUSE_SETLEVEL, &level)); + SYSCALL(ret = ioctl(fd, MOUSE_SETLEVEL, &level)); if (ret != 0) { SynapticsMsg(priv, MSG_ERROR, "Can't set native mode\n"); return FALSE; } - SYSCALL(ret = ioctl(priv->fd, MOUSE_GETHWINFO, &mhw)); + SYSCALL(ret = ioctl(fd, MOUSE_GETHWINFO, &mhw)); if (ret != 0) { SynapticsMsg(priv, MSG_ERROR, "Can't get hardware info\n"); return FALSE; @@ -143,7 +143,7 @@ PSMQueryHardware(SynapticsPrivate *priv) SynapticsMsg(priv, MSG_INFO, "synaptics touchpad found\n"); - if (!psm_synaptics_identify(priv->fd, &psm_ident)) + if (!psm_synaptics_identify(fd, &psm_ident)) return FALSE; convert_hw_info(&psm_ident, synhw); |