[PATCH v7 12/15] net: qrtr: mhi: Report endpoint id in sysfs

Arthur Crepin Leblond arthur at marmottus.net
Tue Sep 15 00:11:31 PDT 2026


On Tue, Sep 15, 2026 at 08:42:04AM +0300, Juha-Matti Tilli wrote:
>+static ssize_t endpoint_show(struct device *dev,
>+			     struct device_attribute *attr, char *buf)
>+{
>+	struct qrtr_mhi_dev *qdev = dev_get_drvdata(dev);
>+
>+	return sprintf(buf, "%u\n", qdev->ep.id);
>+}
>+
>+static DEVICE_ATTR_RO(endpoint);

I think you could use sysfs_emit instead of sprintf.

https://docs.kernel.org/filesystems/sysfs.html#reading-writing-attribute-data

Arthur



More information about the ath12k mailing list