build.c (cecdd52a3dd312564f81a39df08378b7b39a2654) | build.c (75a2d4226b53710380d1017b3f4c88f937ddba78) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) International Business Machines Corp., 2006 4 * Copyright (c) Nokia Corporation, 2007 5 * 6 * Author: Artem Bityutskiy (Битюцкий Артём), 7 * Frank Haverkamp 8 */ --- 81 unchanged lines hidden (view full) --- 90/* Serializes UBI devices creations and removals */ 91DEFINE_MUTEX(ubi_devices_mutex); 92 93/* Protects @ubi_devices and @ubi->ref_count */ 94static DEFINE_SPINLOCK(ubi_devices_lock); 95 96/* "Show" method for files in '/<sysfs>/class/ubi/' */ 97/* UBI version attribute ('/<sysfs>/class/ubi/version') */ | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) International Business Machines Corp., 2006 4 * Copyright (c) Nokia Corporation, 2007 5 * 6 * Author: Artem Bityutskiy (Битюцкий Артём), 7 * Frank Haverkamp 8 */ --- 81 unchanged lines hidden (view full) --- 90/* Serializes UBI devices creations and removals */ 91DEFINE_MUTEX(ubi_devices_mutex); 92 93/* Protects @ubi_devices and @ubi->ref_count */ 94static DEFINE_SPINLOCK(ubi_devices_lock); 95 96/* "Show" method for files in '/<sysfs>/class/ubi/' */ 97/* UBI version attribute ('/<sysfs>/class/ubi/version') */ |
98static ssize_t version_show(struct class *class, struct class_attribute *attr, | 98static ssize_t version_show(const struct class *class, const struct class_attribute *attr, |
99 char *buf) 100{ 101 return sprintf(buf, "%d\n", UBI_VERSION); 102} 103static CLASS_ATTR_RO(version); 104 105static struct attribute *ubi_class_attrs[] = { 106 &class_attr_version.attr, 107 NULL, 108}; 109ATTRIBUTE_GROUPS(ubi_class); 110 111/* Root UBI "class" object (corresponds to '/<sysfs>/class/ubi/') */ 112struct class ubi_class = { 113 .name = UBI_NAME_STR, | 99 char *buf) 100{ 101 return sprintf(buf, "%d\n", UBI_VERSION); 102} 103static CLASS_ATTR_RO(version); 104 105static struct attribute *ubi_class_attrs[] = { 106 &class_attr_version.attr, 107 NULL, 108}; 109ATTRIBUTE_GROUPS(ubi_class); 110 111/* Root UBI "class" object (corresponds to '/<sysfs>/class/ubi/') */ 112struct class ubi_class = { 113 .name = UBI_NAME_STR, |
114 .owner = THIS_MODULE, | |
115 .class_groups = ubi_class_groups, 116}; 117 118static ssize_t dev_attribute_show(struct device *dev, 119 struct device_attribute *attr, char *buf); 120 121/* UBI device attributes (correspond to files in '/<sysfs>/class/ubi/ubiX') */ 122static struct device_attribute dev_eraseblock_size = --- 1377 unchanged lines hidden --- | 114 .class_groups = ubi_class_groups, 115}; 116 117static ssize_t dev_attribute_show(struct device *dev, 118 struct device_attribute *attr, char *buf); 119 120/* UBI device attributes (correspond to files in '/<sysfs>/class/ubi/ubiX') */ 121static struct device_attribute dev_eraseblock_size = --- 1377 unchanged lines hidden --- |