diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-03-01 17:20:29 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-03-01 17:20:29 +1100 |
commit | 763bbd2abc251d351746bfddfbac9d39a74e4492 (patch) | |
tree | f412bc93576ccddd26f3c52a2243e2d2cbbd5bac /core.h | |
parent | 443bdab5db1cd5494e94aa7031c4a25e33a9c6bb (diff) |
Move sysfs functionality to sysfs.c
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.h')
-rw-r--r-- | core.h | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -27,6 +27,12 @@ struct snd_avirt_core { bool streams_sealed; }; +struct snd_avirt_audiopath_obj { + struct kobject kobj; + struct list_head list; + struct snd_avirt_audiopath *path; +}; + /** * snd_avirt_configfs_init - Initialise the configfs system * @core: The snd_avirt_core pointer @@ -41,6 +47,34 @@ int __init snd_avirt_configfs_init(struct snd_avirt_core *core); void __exit snd_avirt_configfs_exit(struct snd_avirt_core *core); /** + * snd_avirt_sysfs_init - Initialise the sysfs system + * @core: The snd_avirt_core pointer + * @return: 0 on success, negative ERRNO on failure + */ +int __init snd_avirt_sysfs_init(struct snd_avirt_core *core); + +/** + * snd_avirt_sysfs_exit - Clean up and exit the sysfs system + * @core: The snd_avirt_core pointer + */ +void __exit snd_avirt_sysfs_exit(struct snd_avirt_core *core); + +/** + * snd_avirt_audiopath_obj - creates an Audio Path object, assigns the kset + * and registers it with sysfs. + * @uid: Unique ID of the Audio Path + * @return: Pointer to the Audio Path object or NULL if it failed. + */ +struct snd_avirt_audiopath_obj *snd_avirt_audiopath_create_obj(const char *uid); + +/** + * snd_avirt_audiopath_destroy_obj - destroys an Audio Path object, deregisters + * it with sysfs + * @name: the Audio Path object + */ +void snd_avirt_audiopath_destroy_obj(struct snd_avirt_audiopath_obj *p); + +/** * snd_avirt_streams_seal - Register the sound card to user space * @return: 0 on success, negative ERRNO on failure */ |