From 8e3fe6a3ed679fa2bf78149a8ed2e6088c7c67e3 Mon Sep 17 00:00:00 2001 From: Michał Winiarski Date: Wed, 13 Mar 2019 12:29:10 +0100 Subject: lib/igt_sysfs: Remove idx from sysfs_open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to sysfs_path - more explicit more better. Signed-off-by: Michał Winiarski Reviewed-by: Chris Wilson --- lib/igt_sysfs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/igt_sysfs.c') 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", -- cgit v1.2.3