From d32abed1e903bc307b5b4adc6ec166e3b9cec738 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 28 Aug 2015 10:22:02 +1000 Subject: [PATCH] driver-hidpp10: return the currently active profile Data is bogus, but let's implement it anyway Signed-off-by: Peter Hutterer --- src/driver-hidpp10.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/driver-hidpp10.c b/src/driver-hidpp10.c index dd06a24b..f7f23cc6 100644 --- a/src/driver-hidpp10.c +++ b/src/driver-hidpp10.c @@ -107,7 +107,17 @@ hidpp10drv_has_capability(const struct ratbag_device *device, enum ratbag_capabi static int hidpp10drv_current_profile(struct ratbag_device *device) { - return -1; + struct hidpp10drv_data *drv_data; + struct hidpp10_device *hidpp10; + int8_t profile; + int rc; + + drv_data = ratbag_get_drv_data(device); + hidpp10 = drv_data->dev; + + rc = hidpp10_get_current_profile(hidpp10, &profile); + + return rc >= 0 ? profile : rc; } static int