]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
habanalabs: remove write_open_cnt property
authorOded Gabbay <oded.gabbay@gmail.com>
Mon, 8 Jul 2019 11:53:43 +0000 (14:53 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 5 Sep 2019 11:55:25 +0000 (14:55 +0300)
This property has attempted to show the number of open file descriptors on
the device. This was a stupid and futile attempt so remove this property
completely.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Documentation/ABI/testing/sysfs-driver-habanalabs
drivers/misc/habanalabs/sysfs.c

index f433fc6db3c69f790107846bf79b924ede4f8165..8d1c81cc9167694f26a39edc4af83df305c22e16 100644 (file)
@@ -186,11 +186,4 @@ What:           /sys/class/habanalabs/hl<n>/uboot_ver
 Date:           Jan 2019
 KernelVersion:  5.1
 Contact:        oded.gabbay@gmail.com
-Description:    Version of the u-boot running on the device's CPU
-
-What:           /sys/class/habanalabs/hl<n>/write_open_cnt
-Date:           Jan 2019
-KernelVersion:  5.1
-Contact:        oded.gabbay@gmail.com
-Description:    Displays the total number of user processes that are currently
-                opened on the device's file
+Description:    Version of the u-boot running on the device's CPU
\ No newline at end of file
index 25eb46d29d880062c673ae3f4aaa9c2760a01cd4..67e3424d4e656202243ac9b5469f076719a8e805 100644 (file)
@@ -351,14 +351,6 @@ static ssize_t status_show(struct device *dev, struct device_attribute *attr,
        return sprintf(buf, "%s\n", str);
 }
 
-static ssize_t write_open_cnt_show(struct device *dev,
-               struct device_attribute *attr, char *buf)
-{
-       struct hl_device *hdev = dev_get_drvdata(dev);
-
-       return sprintf(buf, "%d\n", hdev->user_ctx ? 1 : 0);
-}
-
 static ssize_t soft_reset_cnt_show(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
@@ -461,7 +453,6 @@ static DEVICE_ATTR_RO(soft_reset_cnt);
 static DEVICE_ATTR_RO(status);
 static DEVICE_ATTR_RO(thermal_ver);
 static DEVICE_ATTR_RO(uboot_ver);
-static DEVICE_ATTR_RO(write_open_cnt);
 
 static struct bin_attribute bin_attr_eeprom = {
        .attr = {.name = "eeprom", .mode = (0444)},
@@ -488,7 +479,6 @@ static struct attribute *hl_dev_attrs[] = {
        &dev_attr_status.attr,
        &dev_attr_thermal_ver.attr,
        &dev_attr_uboot_ver.attr,
-       &dev_attr_write_open_cnt.attr,
        NULL,
 };