aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2015-05-07 11:07:22 -0700
committerAndrew Duggan <aduggan@synaptics.com>2015-05-07 11:10:07 -0700
commitb6302c39dc78c8aca79448c0fdf74427fbf48357 (patch)
tree79a1938b79fc5b6ed549bb7b9cdfd9517185e24a
parentf2e021fd2d2411e5aa704bf314558ddcf199a2b7 (diff)
downloadrmi4utils-b6302c39dc78c8aca79448c0fdf74427fbf48357.tar.gz
Fix build warning on ARM and some cleanup.
-rw-r--r--rmidevice/hiddevice.cpp9
-rw-r--r--rmidevice/hiddevice.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/rmidevice/hiddevice.cpp b/rmidevice/hiddevice.cpp
index e4b956c..07e51cb 100644
--- a/rmidevice/hiddevice.cpp
+++ b/rmidevice/hiddevice.cpp
@@ -492,7 +492,8 @@ void HIDDevice::PrintDeviceInfo()
{
fprintf(stdout, "HID device info:\nBus: %s Vendor: 0x%04x Product: 0x%04x\n",
m_info.bustype == BUS_I2C ? "I2C" : "USB", m_info.vendor, m_info.product);
- fprintf(stdout, "Report sizes: input: %ld output: %ld\n", m_inputReportSize, m_outputReportSize);
+ fprintf(stdout, "Report sizes: input: %ld output: %ld\n", (unsigned long)m_inputReportSize,
+ (unsigned long)m_outputReportSize);
}
bool WriteDeviceNameToFile(const char * file, const char * str)
@@ -539,7 +540,7 @@ void HIDDevice::RebindDriver()
return;
}
- if (!FindTransportDriver(bus, hidDeviceName, transportDeviceName, driverPath)) {
+ if (!FindTransportDevice(bus, hidDeviceName, transportDeviceName, driverPath)) {
fprintf(stderr, "Failed to find the transport device / driver for %s\n", hidDeviceName.c_str());
return;
}
@@ -559,7 +560,7 @@ void HIDDevice::RebindDriver()
return;
}
- // The hid device id has changed this is now a new hid device so we have to look up the new name
+ // The hid device id has changed since this is now a new hid device. Now we have to look up the new name.
if (!LookupHidDeviceName(bus, vendor, product, hidDeviceName)) {
fprintf(stderr, "Failed to find HID device name for the specified device: bus (0x%x) vendor: (0x%x) product: (0x%x)\n",
bus, vendor, product);
@@ -574,7 +575,7 @@ void HIDDevice::RebindDriver()
Open(hidrawFile.c_str());
}
-bool HIDDevice::FindTransportDriver(int bus, std::string & hidDeviceName,
+bool HIDDevice::FindTransportDevice(int bus, std::string & hidDeviceName,
std::string & transportDeviceName, std::string & driverPath)
{
std::string devicePrefix = "/sys/bus/";
diff --git a/rmidevice/hiddevice.h b/rmidevice/hiddevice.h
index bdf2b0c..97be0e3 100644
--- a/rmidevice/hiddevice.h
+++ b/rmidevice/hiddevice.h
@@ -75,7 +75,7 @@ private:
// static HID utility functions
static bool LookupHidDeviceName(int bus, int vendorId, int productId, std::string &deviceName);
- static bool FindTransportDriver(int bus, std::string & hidDeviceName,
+ static bool FindTransportDevice(int bus, std::string & hidDeviceName,
std::string & transportDeviceName, std::string & driverPath);
static bool FindHidRawFile(std::string & hidDeviceName, std::string & hidrawFile);
};