Ignore:
Timestamp:
Jan 3, 2021, 7:20:20 AM (5 years ago)
Author:
Paul Smedley
Message:

Code cleanups to simplify future maintenance, update regmap/regcache/rbtree to linux 4.19.163 level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/lib32/misc.c

    r615 r625  
    246246{
    247247    return 0;
     248}
     249//******************************************************************************
     250//******************************************************************************
     251struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode,
     252        struct proc_dir_entry *parent){
     253    struct proc_dir_entry *proc;
     254    proc = (struct proc_dir_entry *)kmalloc(sizeof(struct proc_dir_entry), 0);
     255    memset(proc, 0, sizeof(struct proc_dir_entry));
     256
     257    proc->name   = name;
     258    proc->parent = parent;
     259
     260    return proc;
     261}
     262//******************************************************************************
     263//******************************************************************************
     264struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent)
     265{
     266    return proc_mkdir_mode(name, S_IRUGO | S_IXUGO, parent);
     267}
     268//******************************************************************************
     269//******************************************************************************
     270struct proc_dir_entry *proc_symlink(const char *name, struct proc_dir_entry *parent, const char *dest)
     271{
     272    struct proc_dir_entry *proc;
     273    proc = (struct proc_dir_entry *)kmalloc(sizeof(struct proc_dir_entry), 0);
     274    memset(proc, 0, sizeof(struct proc_dir_entry));
     275
     276    proc->name   = name;
     277    proc->parent = parent;
     278    proc->data = dest;
     279
     280    return proc;
    248281}
    249282//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.