clang-format
This commit is contained in:
@@ -44,23 +44,22 @@
|
||||
#include <lamebus/ltimer.h>
|
||||
#include "autoconf.h"
|
||||
|
||||
struct rtclock_softc *
|
||||
attach_rtclock_to_ltimer(int rtclockno, struct ltimer_softc *ls)
|
||||
{
|
||||
/*
|
||||
* No need to probe; ltimer always has a clock.
|
||||
* Just allocate the rtclock, set our fields, and return it.
|
||||
*/
|
||||
struct rtclock_softc *rtc = kmalloc(sizeof(struct rtclock_softc));
|
||||
if (rtc==NULL) {
|
||||
/* Out of memory */
|
||||
return NULL;
|
||||
}
|
||||
struct rtclock_softc *attach_rtclock_to_ltimer(int rtclockno,
|
||||
struct ltimer_softc *ls) {
|
||||
/*
|
||||
* No need to probe; ltimer always has a clock.
|
||||
* Just allocate the rtclock, set our fields, and return it.
|
||||
*/
|
||||
struct rtclock_softc *rtc = kmalloc(sizeof(struct rtclock_softc));
|
||||
if (rtc == NULL) {
|
||||
/* Out of memory */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
(void)rtclockno; // unused
|
||||
(void)rtclockno; // unused
|
||||
|
||||
rtc->rtc_devdata = ls;
|
||||
rtc->rtc_gettime = ltimer_gettime;
|
||||
rtc->rtc_devdata = ls;
|
||||
rtc->rtc_gettime = ltimer_gettime;
|
||||
|
||||
return rtc;
|
||||
return rtc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user