summaryrefslogtreecommitdiff
path: root/src/lib/eeze
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-12-14 07:35:07 -0500
committerChris Michael <cp.michael@samsung.com>2017-12-14 07:35:07 -0500
commitaf4af300af748f9090971409f733bff641537469 (patch)
tree4d6de3854295c068f0d7170d5331a76ce8896f76 /src/lib/eeze
parent5f7d942253afadb6e0623fe6561fc03f000bc1ea (diff)
eeze: Remove unused device variables
As we do not ever use the udev_devices created from udev_device_new_from_syspath in these functions, remove them. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/eeze')
-rw-r--r--src/lib/eeze/eeze_udev_find.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/lib/eeze/eeze_udev_find.c b/src/lib/eeze/eeze_udev_find.c
index 35cdbe83c5..3b1e5ef926 100644
--- a/src/lib/eeze/eeze_udev_find.c
+++ b/src/lib/eeze/eeze_udev_find.c
@@ -328,7 +328,6 @@ eeze_udev_find_by_filter(const char *subsystem,
328{ 328{
329 _udev_enumerate *en; 329 _udev_enumerate *en;
330 _udev_list_entry *devs, *cur; 330 _udev_list_entry *devs, *cur;
331 _udev_device *device;
332 const char *devname; 331 const char *devname;
333 Eina_List *ret = NULL; 332 Eina_List *ret = NULL;
334 333
@@ -350,15 +349,11 @@ eeze_udev_find_by_filter(const char *subsystem,
350 udev_list_entry_foreach(cur, devs) 349 udev_list_entry_foreach(cur, devs)
351 { 350 {
352 devname = udev_list_entry_get_name(cur); 351 devname = udev_list_entry_get_name(cur);
353 device = udev_device_new_from_syspath(udev, devname);
354 352
355 if (name) 353 if (name && (!strstr(devname, name)))
356 if (!strstr(devname, name)) 354 continue;
357 goto out;
358 355
359 ret = eina_list_append(ret, eina_stringshare_add(devname)); 356 ret = eina_list_append(ret, eina_stringshare_add(devname));
360out:
361 udev_device_unref(device);
362 } 357 }
363 udev_enumerate_unref(en); 358 udev_enumerate_unref(en);
364 return ret; 359 return ret;
@@ -370,7 +365,6 @@ eeze_udev_find_by_sysattr(const char *sysattr,
370{ 365{
371 _udev_enumerate *en; 366 _udev_enumerate *en;
372 _udev_list_entry *devs, *cur; 367 _udev_list_entry *devs, *cur;
373 _udev_device *device;
374 const char *devname; 368 const char *devname;
375 Eina_List *ret = NULL; 369 Eina_List *ret = NULL;
376 370
@@ -388,9 +382,7 @@ eeze_udev_find_by_sysattr(const char *sysattr,
388 udev_list_entry_foreach(cur, devs) 382 udev_list_entry_foreach(cur, devs)
389 { 383 {
390 devname = udev_list_entry_get_name(cur); 384 devname = udev_list_entry_get_name(cur);
391 device = udev_device_new_from_syspath(udev, devname);
392 ret = eina_list_append(ret, eina_stringshare_add(devname)); 385 ret = eina_list_append(ret, eina_stringshare_add(devname));
393 udev_device_unref(device);
394 } 386 }
395 udev_enumerate_unref(en); 387 udev_enumerate_unref(en);
396 return ret; 388 return ret;
@@ -401,7 +393,6 @@ eeze_udev_find_by_subsystem_sysname(const char *subsystem, const char *sysname)
401{ 393{
402 _udev_enumerate *en; 394 _udev_enumerate *en;
403 _udev_list_entry *devs, *cur; 395 _udev_list_entry *devs, *cur;
404 _udev_device *device;
405 const char *devname; 396 const char *devname;
406 Eina_List *ret = NULL; 397 Eina_List *ret = NULL;
407 398
@@ -416,10 +407,7 @@ eeze_udev_find_by_subsystem_sysname(const char *subsystem, const char *sysname)
416 udev_list_entry_foreach(cur, devs) 407 udev_list_entry_foreach(cur, devs)
417 { 408 {
418 devname = udev_list_entry_get_name(cur); 409 devname = udev_list_entry_get_name(cur);
419 device = udev_device_new_from_syspath(udev, devname);
420 if (!device) continue;
421 ret = eina_list_append(ret, eina_stringshare_add(devname)); 410 ret = eina_list_append(ret, eina_stringshare_add(devname));
422 udev_device_unref(device);
423 } 411 }
424 udev_enumerate_unref(en); 412 udev_enumerate_unref(en);
425 return ret; 413 return ret;