Module Name: src
Committed By: riastradh
Date: Mon Jan 13 16:17:36 UTC 2025
Modified Files:
src/sys/arch/macppc/dev: aed.c akbd.c
Log Message:
macppc/aed, akbd: Nix trailing whitespace.
No functional change intended.
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/macppc/dev/aed.c
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/macppc/dev/akbd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/macppc/dev/aed.c
diff -u src/sys/arch/macppc/dev/aed.c:1.36 src/sys/arch/macppc/dev/aed.c:1.37
--- src/sys/arch/macppc/dev/aed.c:1.36 Sun Jan 12 09:07:02 2025
+++ src/sys/arch/macppc/dev/aed.c Mon Jan 13 16:17:36 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: aed.c,v 1.36 2025/01/12 09:07:02 nat Exp $ */
+/* $NetBSD: aed.c,v 1.37 2025/01/13 16:17:36 riastradh Exp $ */
/*
* Copyright (C) 1994 Bradley A. Grantham
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.36 2025/01/12 09:07:02 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aed.c,v 1.37 2025/01/13 16:17:36 riastradh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -132,11 +132,11 @@ aedattach(device_t parent, device_t self
sc->sc_rptinterval = 6;
sc->sc_repeating = -1; /* not repeating */
- /* Pull in the options flags. */
+ /* Pull in the options flags. */
sc->sc_options = (device_cfdata(self)->cf_flags | aed_options);
sc->sc_ioproc = NULL;
-
+
sc->sc_buttons = 0;
sc->sc_open = 0;
@@ -149,7 +149,7 @@ aedattach(device_t parent, device_t self
}
/*
- * Given a keyboard ADB event, record the keycode and call the key
+ * Given a keyboard ADB event, record the keycode and call the key
* repeat handler, optionally passing the event through the mouse
* button emulation handler first. Pass mouse events directly to
* the handoff function.
@@ -186,7 +186,7 @@ aed_input(adb_event_t *event)
* 3rd mouse button events while the 1, 2, and 3 keys will generate
* the corresponding mouse button event.
*/
-static int
+static int
aed_emulate_mouse(adb_event_t *event)
{
static int emulmodkey_down = 0;
@@ -331,7 +331,7 @@ aed_emulate_mouse(adb_event_t *event)
* for the repeating key and schedules the next call at sc_rptinterval
* ticks in the future.
*/
-static void
+static void
aed_kbdrpt(void *kstate)
{
struct aed_softc *sc = (struct aed_softc *)kstate;
@@ -350,13 +350,12 @@ aed_kbdrpt(void *kstate)
}
}
-
/*
* Cancels the currently repeating key event if there is one, schedules
* a new repeating key event if needed, and hands the event off to the
* appropriate subsystem.
*/
-static void
+static void
aed_dokeyupdown(adb_event_t *event)
{
int kbd_key;
@@ -395,7 +394,7 @@ aed_handoff(adb_event_t *event)
/*
* Place the event in the event queue and wakeup any waiting processes.
*/
-static void
+static void
aed_enqevent(adb_event_t *event)
{
int s;
@@ -425,7 +424,7 @@ aed_enqevent(adb_event_t *event)
splx(s);
}
-int
+int
aedopen(dev_t dev, int flag, int mode, struct lwp *l)
{
int unit;
@@ -451,8 +450,7 @@ aedopen(dev_t dev, int flag, int mode, s
return (error);
}
-
-int
+int
aedclose(dev_t dev, int flag, int mode, struct lwp *l)
{
int s = spladb();
@@ -464,8 +462,7 @@ aedclose(dev_t dev, int flag, int mode,
return (0);
}
-
-int
+int
aedread(dev_t dev, struct uio *uio, int flag)
{
int s, error;
@@ -510,7 +507,7 @@ aedread(dev_t dev, struct uio *uio, int
return (0);
}
-int
+int
aedioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
{
switch (cmd) {
@@ -573,14 +570,13 @@ aedioctl(dev_t dev, u_long cmd, void *da
return (0);
}
-
-int
+int
aedpoll(dev_t dev, int events, struct lwp *l)
{
int s, revents;
revents = events & (POLLOUT | POLLWRNORM);
-
+
if ((events & (POLLIN | POLLRDNORM)) == 0)
return (revents);
Index: src/sys/arch/macppc/dev/akbd.c
diff -u src/sys/arch/macppc/dev/akbd.c:1.48 src/sys/arch/macppc/dev/akbd.c:1.49
--- src/sys/arch/macppc/dev/akbd.c:1.48 Sun Jan 12 09:07:02 2025
+++ src/sys/arch/macppc/dev/akbd.c Mon Jan 13 16:17:36 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: akbd.c,v 1.48 2025/01/12 09:07:02 nat Exp $ */
+/* $NetBSD: akbd.c,v 1.49 2025/01/13 16:17:36 riastradh Exp $ */
/*
* Copyright (C) 1998 Colin Wood
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: akbd.c,v 1.48 2025/01/12 09:07:02 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: akbd.c,v 1.49 2025/01/13 16:17:36 riastradh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -253,12 +253,11 @@ akbdattach(device_t parent, device_t sel
sc->sc_wskbddev = config_found(self, &a, wskbddevprint, CFARGS_NONE);
}
-
/*
* Handle putting the keyboard data received from the ADB into
* an ADB event record.
*/
-void
+void
kbd_adbcomplete(uint8_t *buffer, uint8_t *data_area, int adb_command)
{
adb_event_t event;
@@ -296,7 +295,7 @@ kbd_adbcomplete(uint8_t *buffer, uint8_t
}
/*
- * Given a keyboard ADB event, record the keycodes and call the key
+ * Given a keyboard ADB event, record the keycodes and call the key
* repeat handler, optionally passing the event through the mouse
* button emulation handler first.
*/
@@ -354,11 +353,11 @@ getleds(int addr)
/*
* Set the keyboard LED's.
- *
+ *
* Automatically translates from ioctl/softc format to the
* actual keyboard register format
*/
-static int
+static int
setleds(struct akbd_softc *ksc, u_char leds)
{
int addr;
@@ -391,13 +390,13 @@ setleds(struct akbd_softc *ksc, u_char l
if ((buffer[2] & 0xf8) != leds)
return (EIO);
else
- return (0);
+ return (0);
}
/*
* Toggle all of the LED's on and off, just for show.
*/
-static void
+static void
blinkleds(struct akbd_softc *ksc)
{
int addr, i;
@@ -416,7 +415,7 @@ blinkleds(struct akbd_softc *ksc)
i = 10;
do {
(void)setleds(ksc, (u_char)0x00);
- } while (setleds(ksc, (u_char)0x00) && (i-- > 0));
+ } while (setleds(ksc, (u_char)0x00) && (i-- > 0));
return;
}
@@ -498,10 +497,10 @@ kbd_passup(struct akbd_softc *sc,int key
} else {
int press, val;
int type;
-
+
press = ADBK_PRESS(key);
val = ADBK_KEYVAL(key);
-
+
type = press ? WSCONS_EVENT_KEY_DOWN : WSCONS_EVENT_KEY_UP;
wskbd_input(sc->sc_wskbddev, type, val);
@@ -531,7 +530,7 @@ kbd_intr(void *arg)
*/
if ((key == 57) || (key == 185))
shift = 0;
-
+
if (key == 255) {
if (shift == 0) {
key = 185;