| Index: ui/events/ozone/evdev/event_device_info.cc
|
| diff --git a/ui/events/ozone/evdev/event_device_info.cc b/ui/events/ozone/evdev/event_device_info.cc
|
| index e3c9f73c34a07991629338169d44d248406d0040..dd297791ec6762d2d3c2513878c6062372c4d141 100644
|
| --- a/ui/events/ozone/evdev/event_device_info.cc
|
| +++ b/ui/events/ozone/evdev/event_device_info.cc
|
| @@ -17,11 +17,6 @@ namespace ui {
|
|
|
| namespace {
|
|
|
| -// USB vendor and product strings are pragmatically limited to 126
|
| -// characters each, so device names more than twice that should be
|
| -// unusual.
|
| -const size_t kMaximumDeviceNameLength = 256;
|
| -
|
| bool GetEventBits(int fd, unsigned int type, void* buf, unsigned int size) {
|
| if (ioctl(fd, EVIOCGBIT(type, size), buf) < 0) {
|
| PLOG(ERROR) << "EVIOCGBIT(" << type << ", " << size << ") on fd " << fd;
|
| @@ -48,27 +43,6 @@ bool GetAbsInfo(int fd, int code, struct input_absinfo* absinfo) {
|
| return true;
|
| }
|
|
|
| -bool GetDeviceName(int fd, std::string* name) {
|
| - char device_name[kMaximumDeviceNameLength];
|
| - if (ioctl(fd, EVIOCGNAME(kMaximumDeviceNameLength - 1), &device_name) < 0) {
|
| - PLOG(INFO) << "Can't read device name on fd " << fd;
|
| - return false;
|
| - }
|
| - *name = device_name;
|
| - return true;
|
| -}
|
| -
|
| -bool GetDeviceIdentifiers(int fd, uint16_t* vendor, uint16_t* product) {
|
| - struct input_id evdev_id;
|
| - if (ioctl(fd, EVIOCGID, &evdev_id) < 0) {
|
| - PLOG(INFO) << "Can't read device name on fd " << fd;
|
| - return false;
|
| - }
|
| - *vendor = evdev_id.vendor;
|
| - *product = evdev_id.product;
|
| - return true;
|
| -}
|
| -
|
| // |request| needs to be the equivalent to:
|
| // struct input_mt_request_layout {
|
| // uint32_t code;
|
| @@ -161,12 +135,6 @@ bool EventDeviceInfo::Initialize(int fd) {
|
| slots->assign(request_slots, request_slots + max_num_slots);
|
| }
|
|
|
| - if (!GetDeviceName(fd, &name_))
|
| - return false;
|
| -
|
| - if (!GetDeviceIdentifiers(fd, &vendor_id_, &product_id_))
|
| - return false;
|
| -
|
| return true;
|
| }
|
|
|
|
|