devalarm: Use the dummy dev functions
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 22 Feb 2018 21:45:09 +0000 (16:45 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 6 Apr 2018 19:23:01 +0000 (15:23 -0400)
The alarm functions do the same thing as the dev functions.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/alarm.c

index 077c806..10302f9 100644 (file)
@@ -344,22 +344,6 @@ static struct chan *alarmopen(struct chan *c, int omode)
        return c;
 }
 
        return c;
 }
 
-static void alarmcreate(struct chan *c, char *name, int omode, uint32_t perm)
-{
-       error(EPERM, ERROR_FIXME);
-}
-
-static void alarmremove(struct chan *c)
-{
-       error(EPERM, ERROR_FIXME);
-}
-
-static int alarmwstat(struct chan *c, uint8_t * dp, int n)
-{
-       error(EFAIL, "No alarmwstat");
-       return 0;
-}
-
 static void alarmclose(struct chan *c)
 {
        /* There are more closes than opens.  For instance, sysstat doesn't open,
 static void alarmclose(struct chan *c)
 {
        /* There are more closes than opens.  For instance, sysstat doesn't open,
@@ -576,14 +560,14 @@ struct dev alarmdevtab __devtab = {
        .walk = alarmwalk,
        .stat = alarmstat,
        .open = alarmopen,
        .walk = alarmwalk,
        .stat = alarmstat,
        .open = alarmopen,
-       .create = alarmcreate,
+       .create = devcreate,
        .close = alarmclose,
        .read = alarmread,
        .bread = devbread,
        .write = alarmwrite,
        .bwrite = devbwrite,
        .close = alarmclose,
        .read = alarmread,
        .bread = devbread,
        .write = alarmwrite,
        .bwrite = devbwrite,
-       .remove = alarmremove,
-       .wstat = alarmwstat,
+       .remove = devremove,
+       .wstat = devwstat,
        .power = devpower,
        .chaninfo = alarm_chaninfo,
        .tapfd = alarm_tapfd,
        .power = devpower,
        .chaninfo = alarm_chaninfo,
        .tapfd = alarm_tapfd,