main.c (b4a6700c80f9ecbb848fd1fa3ce72062a7a65e93) main.c (2f79d3d1f7f0885d574811f80c6e0473ab8ef5ab)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2003-2020, Intel Corporation. All rights reserved.
4 * Intel Management Engine Interface (Intel MEI) Linux driver
5 */
6
7#include <linux/module.h>
8#include <linux/moduleparam.h>

--- 871 unchanged lines hidden (view full) ---

880
881 clsdev = class_find_device_by_devt(mei_class, dev->cdev.dev);
882 if (clsdev) {
883 sysfs_notify(&clsdev->kobj, NULL, "dev_state");
884 put_device(clsdev);
885 }
886}
887
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2003-2020, Intel Corporation. All rights reserved.
4 * Intel Management Engine Interface (Intel MEI) Linux driver
5 */
6
7#include <linux/module.h>
8#include <linux/moduleparam.h>

--- 871 unchanged lines hidden (view full) ---

880
881 clsdev = class_find_device_by_devt(mei_class, dev->cdev.dev);
882 if (clsdev) {
883 sysfs_notify(&clsdev->kobj, NULL, "dev_state");
884 put_device(clsdev);
885 }
886}
887
888/**
889 * kind_show - display device kind
890 *
891 * @device: device pointer
892 * @attr: attribute pointer
893 * @buf: char out buffer
894 *
895 * Return: number of the bytes printed into buf or error
896 */
897static ssize_t kind_show(struct device *device,
898 struct device_attribute *attr, char *buf)
899{
900 struct mei_device *dev = dev_get_drvdata(device);
901 ssize_t ret;
902
903 if (dev->kind)
904 ret = sprintf(buf, "%s\n", dev->kind);
905 else
906 ret = sprintf(buf, "%s\n", "mei");
907
908 return ret;
909}
910static DEVICE_ATTR_RO(kind);
911
888static struct attribute *mei_attrs[] = {
889 &dev_attr_fw_status.attr,
890 &dev_attr_hbm_ver.attr,
891 &dev_attr_hbm_ver_drv.attr,
892 &dev_attr_tx_queue_limit.attr,
893 &dev_attr_fw_ver.attr,
894 &dev_attr_dev_state.attr,
895 &dev_attr_trc.attr,
912static struct attribute *mei_attrs[] = {
913 &dev_attr_fw_status.attr,
914 &dev_attr_hbm_ver.attr,
915 &dev_attr_hbm_ver_drv.attr,
916 &dev_attr_tx_queue_limit.attr,
917 &dev_attr_fw_ver.attr,
918 &dev_attr_dev_state.attr,
919 &dev_attr_trc.attr,
920 &dev_attr_kind.attr,
896 NULL
897};
898ATTRIBUTE_GROUPS(mei);
899
900/*
901 * file operations structure will be used for mei char device.
902 */
903static const struct file_operations mei_fops = {

--- 154 unchanged lines hidden ---
921 NULL
922};
923ATTRIBUTE_GROUPS(mei);
924
925/*
926 * file operations structure will be used for mei char device.
927 */
928static const struct file_operations mei_fops = {

--- 154 unchanged lines hidden ---