diff options
author | Michał Winiarski <michal.winiarski@intel.com> | 2019-03-13 12:29:10 +0100 |
---|---|---|
committer | Michał Winiarski <michal.winiarski@intel.com> | 2019-03-20 10:36:36 +0100 |
commit | 8e3fe6a3ed679fa2bf78149a8ed2e6088c7c67e3 (patch) | |
tree | 5c4ede455574b371b071a00393fd7af75e2a3270 /lib/igt_sysfs.c | |
parent | 023d7b426dcf9810fc62e783dfaf7e282cd97641 (diff) |
lib/igt_sysfs: Remove idx from sysfs_open
Similar to sysfs_path - more explicit more better.
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_sysfs.c')
-rw-r--r-- | lib/igt_sysfs.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c index 5a25d579..aa880775 100644 --- a/lib/igt_sysfs.c +++ b/lib/igt_sysfs.c @@ -135,7 +135,6 @@ char *igt_sysfs_path(int device, char *path, int pathlen) /** * igt_sysfs_open: * @device: fd of the device - * @idx: optional pointer to store the card index of the opened device * * This opens the sysfs directory corresponding to device for use * with igt_sysfs_set() and igt_sysfs_get(). @@ -143,16 +142,13 @@ char *igt_sysfs_path(int device, char *path, int pathlen) * Returns: * The directory fd, or -1 on failure. */ -int igt_sysfs_open(int device, int *idx) +int igt_sysfs_open(int device) { char path[80]; if (!igt_sysfs_path(device, path, sizeof(path))) return -1; - if (idx) - *idx = igt_device_get_card_index(device); - return open(path, O_RDONLY); } @@ -199,7 +195,7 @@ int igt_sysfs_open_parameters(int device) { int dir, params = -1; - dir = igt_sysfs_open(device, ¶ms); + dir = igt_sysfs_open(device); if (dir >= 0) { params = openat(dir, "device/driver/module/parameters", |