Commit 5d4dc630 authored by Chris Michael's avatar Chris Michael Committed by Carsten Haitzler (Rasterman)

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: default avatarChris Michael <cp.michael@samsung.com>
parent c2166206
......@@ -325,7 +325,6 @@ eeze_udev_find_by_filter(const char *subsystem,
{
_udev_enumerate *en;
_udev_list_entry *devs, *cur;
_udev_device *device;
const char *devname;
Eina_List *ret = NULL;
......@@ -347,15 +346,11 @@ eeze_udev_find_by_filter(const char *subsystem,
udev_list_entry_foreach(cur, devs)
{
devname = udev_list_entry_get_name(cur);
device = udev_device_new_from_syspath(udev, devname);
if (name)
if (!strstr(devname, name))
goto out;
if (name && (!strstr(devname, name)))
continue;
ret = eina_list_append(ret, eina_stringshare_add(devname));
out:
udev_device_unref(device);
}
udev_enumerate_unref(en);
return ret;
......@@ -367,7 +362,6 @@ eeze_udev_find_by_sysattr(const char *sysattr,
{
_udev_enumerate *en;
_udev_list_entry *devs, *cur;
_udev_device *device;
const char *devname;
Eina_List *ret = NULL;
......@@ -385,9 +379,7 @@ eeze_udev_find_by_sysattr(const char *sysattr,
udev_list_entry_foreach(cur, devs)
{
devname = udev_list_entry_get_name(cur);
device = udev_device_new_from_syspath(udev, devname);
ret = eina_list_append(ret, eina_stringshare_add(devname));
udev_device_unref(device);
}
udev_enumerate_unref(en);
return ret;
......@@ -398,7 +390,6 @@ eeze_udev_find_by_subsystem_sysname(const char *subsystem, const char *sysname)
{
_udev_enumerate *en;
_udev_list_entry *devs, *cur;
_udev_device *device;
const char *devname;
Eina_List *ret = NULL;
......@@ -413,10 +404,7 @@ eeze_udev_find_by_subsystem_sysname(const char *subsystem, const char *sysname)
udev_list_entry_foreach(cur, devs)
{
devname = udev_list_entry_get_name(cur);
device = udev_device_new_from_syspath(udev, devname);
if (!device) continue;
ret = eina_list_append(ret, eina_stringshare_add(devname));
udev_device_unref(device);
}
udev_enumerate_unref(en);
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment