From d9a1dfb7ba96fceed57561b02c2c3392abb87336 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 21 May 2025 17:10:24 +0200 Subject: [PATCH] xfree86: i2c: drop unused xf86I2CReadWord() Not used anywhere, so no need to keep it around any longer. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/i2c/xf86i2c.c | 17 ----------------- hw/xfree86/i2c/xf86i2c.h | 2 -- 2 files changed, 19 deletions(-) diff --git a/hw/xfree86/i2c/xf86i2c.c b/hw/xfree86/i2c/xf86i2c.c index 24bbe03da..0523db314 100644 --- a/hw/xfree86/i2c/xf86i2c.c +++ b/hw/xfree86/i2c/xf86i2c.c @@ -471,23 +471,6 @@ xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte, int n) return xf86I2CWriteRead(d, &subaddr, 1, pbyte, n); } -/* Read a word (high byte, then low byte) from one of the registers - * determined by its sub-address. - */ - -Bool -xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword) -{ - I2CByte rb[2]; - - if (!xf86I2CWriteRead(d, &subaddr, 1, rb, 2)) - return FALSE; - - *pword = (rb[0] << 8) | rb[1]; - - return TRUE; -} - /* Write a byte to one of the registers determined by its sub-address. */ diff --git a/hw/xfree86/i2c/xf86i2c.h b/hw/xfree86/i2c/xf86i2c.h index ca49f1e1a..a6c72bf26 100644 --- a/hw/xfree86/i2c/xf86i2c.h +++ b/hw/xfree86/i2c/xf86i2c.h @@ -102,8 +102,6 @@ extern _X_EXPORT Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte); extern _X_EXPORT Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte, int n); -extern _X_EXPORT Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, - unsigned short *pword); #define xf86I2CWrite(d, wb, nw) xf86I2CWriteRead(d, wb, nw, NULL, 0) extern _X_EXPORT Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte);