kobject.h (328653) | kobject.h (331756) |
---|---|
1/*- 2 * Copyright (c) 2010 Isilon Systems, Inc. 3 * Copyright (c) 2010 iX Systems, Inc. 4 * Copyright (c) 2010 Panasas, Inc. 5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2010 Isilon Systems, Inc. 3 * Copyright (c) 2010 iX Systems, Inc. 4 * Copyright (c) 2010 Panasas, Inc. 5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $FreeBSD: stable/11/sys/compat/linuxkpi/common/include/linux/kobject.h 328653 2018-02-01 13:01:44Z hselasky $ | 29 * $FreeBSD: stable/11/sys/compat/linuxkpi/common/include/linux/kobject.h 331756 2018-03-30 02:04:46Z emaste $ |
30 */ 31#ifndef _LINUX_KOBJECT_H_ 32#define _LINUX_KOBJECT_H_ 33 34#include <machine/stdarg.h> 35 36#include <linux/kernel.h> 37#include <linux/kref.h> --- 18 unchanged lines hidden (view full) --- 56 const struct kobj_type *ktype; 57 struct list_head entry; 58 struct sysctl_oid *oidp; 59}; 60 61extern struct kobject *mm_kobj; 62 63struct attribute { | 30 */ 31#ifndef _LINUX_KOBJECT_H_ 32#define _LINUX_KOBJECT_H_ 33 34#include <machine/stdarg.h> 35 36#include <linux/kernel.h> 37#include <linux/kref.h> --- 18 unchanged lines hidden (view full) --- 56 const struct kobj_type *ktype; 57 struct list_head entry; 58 struct sysctl_oid *oidp; 59}; 60 61extern struct kobject *mm_kobj; 62 63struct attribute { |
64 const char *name; | 64 const char *name; |
65 struct module *owner; 66 mode_t mode; 67}; 68 69struct kobj_attribute { | 65 struct module *owner; 66 mode_t mode; 67}; 68 69struct kobj_attribute { |
70 struct attribute attr; 71 ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, 72 char *buf); 73 ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, 74 const char *buf, size_t count); | 70 struct attribute attr; 71 ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, 72 char *buf); 73 ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, 74 const char *buf, size_t count); |
75}; 76 77static inline void 78kobject_init(struct kobject *kobj, const struct kobj_type *ktype) 79{ 80 81 kref_init(&kobj->kref); 82 INIT_LIST_HEAD(&kobj->entry); --- 72 unchanged lines hidden --- | 75}; 76 77static inline void 78kobject_init(struct kobject *kobj, const struct kobj_type *ktype) 79{ 80 81 kref_init(&kobj->kref); 82 INIT_LIST_HEAD(&kobj->entry); --- 72 unchanged lines hidden --- |