Ignore:
Timestamp:
Jan 1, 2021, 5:31:48 AM (5 years ago)
Author:
Paul Smedley
Message:

Add source for uniaud32 based on code from linux kernel 5.4.86

Location:
GPL/branches/uniaud32-next
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/include/linux/module.h

    r598 r615  
    77#ifndef _LINUX_MODULE_H
    88#define _LINUX_MODULE_H
    9 
     9#include <linux/moduleparam.h>
    1010/* Poke the use count of a module.  */
    1111
     
    7878#define MODULE_ALIAS_CHARDEV(x)
    7979#define module_param(name, type, perm)
     80
     81/**
     82 * module_driver() - Helper macro for drivers that don't do anything
     83 * special in module init/exit. This eliminates a lot of boilerplate.
     84 * Each module may only use this macro once, and calling it replaces
     85 * module_init() and module_exit().
     86 *
     87 * @__driver: driver name
     88 * @__register: register function for this driver type
     89 * @__unregister: unregister function for this driver type
     90 * @...: Additional arguments to be passed to __register and __unregister.
     91 *
     92 * Use this macro to construct bus specific macros for registering
     93 * drivers, and do not use it on its own.
     94 */
     95#define module_driver(__driver, __register, __unregister, ...) \
     96static int __init __driver##_init(void) \
     97{ \
     98        return __register(&__driver, ##__VA_ARGS__); \
     99} \
     100module_init(__driver##_init); \
     101static void __exit __driver##_exit(void) \
     102{ \
     103        __unregister(&__driver, ##__VA_ARGS__); \
     104} \
     105module_exit(__driver##_exit);
     106#define symbol_put_addr(p) do { } while (0)
     107#define postcore_initcall(fn)           module_init(fn)
     108
     109#define MODULE_NAME_LEN 255
     110
     111struct module {
     112        /* Unique handle for this module */
     113        char name[MODULE_NAME_LEN];
     114};
    80115#endif /* _LINUX_MODULE_H */
Note: See TracChangeset for help on using the changeset viewer.