115dba7a9SFrançois Tigeot /* 2*63ea148eSFrançois Tigeot * Copyright (c) 2018-2019 François Tigeot <ftigeot@wolfpond.org> 315dba7a9SFrançois Tigeot * All rights reserved. 415dba7a9SFrançois Tigeot * 515dba7a9SFrançois Tigeot * Redistribution and use in source and binary forms, with or without 615dba7a9SFrançois Tigeot * modification, are permitted provided that the following conditions 715dba7a9SFrançois Tigeot * are met: 815dba7a9SFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 915dba7a9SFrançois Tigeot * notice unmodified, this list of conditions, and the following 1015dba7a9SFrançois Tigeot * disclaimer. 1115dba7a9SFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 1215dba7a9SFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 1315dba7a9SFrançois Tigeot * documentation and/or other materials provided with the distribution. 1415dba7a9SFrançois Tigeot * 1515dba7a9SFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1615dba7a9SFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1715dba7a9SFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1815dba7a9SFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1915dba7a9SFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2015dba7a9SFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2115dba7a9SFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2215dba7a9SFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2315dba7a9SFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2415dba7a9SFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2515dba7a9SFrançois Tigeot */ 2615dba7a9SFrançois Tigeot 2715dba7a9SFrançois Tigeot #ifndef _LINUX_SYSFS_H_ 2815dba7a9SFrançois Tigeot #define _LINUX_SYSFS_H_ 2915dba7a9SFrançois Tigeot 3015dba7a9SFrançois Tigeot #include <linux/compiler.h> 3115dba7a9SFrançois Tigeot #include <linux/errno.h> 3215dba7a9SFrançois Tigeot #include <linux/list.h> 3315dba7a9SFrançois Tigeot #include <linux/lockdep.h> 3415dba7a9SFrançois Tigeot #include <linux/atomic.h> 3515dba7a9SFrançois Tigeot 3615dba7a9SFrançois Tigeot struct kobject; 3715dba7a9SFrançois Tigeot 3815dba7a9SFrançois Tigeot struct attribute { 3915dba7a9SFrançois Tigeot const char *name; 4015dba7a9SFrançois Tigeot umode_t mode; 4115dba7a9SFrançois Tigeot }; 4215dba7a9SFrançois Tigeot 4315dba7a9SFrançois Tigeot struct sysfs_ops { 4415dba7a9SFrançois Tigeot ssize_t (*show)(struct kobject *, struct attribute *,char *); 4515dba7a9SFrançois Tigeot ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); 4615dba7a9SFrançois Tigeot }; 4715dba7a9SFrançois Tigeot 48*63ea148eSFrançois Tigeot static inline int 49*63ea148eSFrançois Tigeot sysfs_create_link(struct kobject *kobj, struct kobject *target, const char *name) 50*63ea148eSFrançois Tigeot { 51*63ea148eSFrançois Tigeot return 0; 52*63ea148eSFrançois Tigeot } 53*63ea148eSFrançois Tigeot 54*63ea148eSFrançois Tigeot static inline void 55*63ea148eSFrançois Tigeot sysfs_remove_link(struct kobject *kobj, const char *name) 56*63ea148eSFrançois Tigeot { 57*63ea148eSFrançois Tigeot } 58*63ea148eSFrançois Tigeot 5915dba7a9SFrançois Tigeot #endif /* _LINUX_SYSFS_H_ */ 60