adb: clean up empty lines in .c and .h files

This commit is contained in:
Mateusz Guzik
2020-09-01 21:34:24 +00:00
parent 3149873ac3
commit 06261cf209
6 changed files with 22 additions and 35 deletions
-1
View File
@@ -78,4 +78,3 @@ extern devclass_t adb_devclass;
extern driver_t adb_driver; extern driver_t adb_driver;
#endif #endif
-1
View File
@@ -198,7 +198,6 @@ static int adb_bus_detach(device_t dev)
return (bus_generic_detach(dev)); return (bus_generic_detach(dev));
} }
static void static void
adb_probe_nomatch(device_t dev, device_t child) adb_probe_nomatch(device_t dev, device_t child)
{ {
-2
View File
@@ -69,7 +69,6 @@ static device_method_t abtn_methods[] = {
/* ADB interface */ /* ADB interface */
DEVMETHOD(adb_receive_packet, abtn_receive_packet), DEVMETHOD(adb_receive_packet, abtn_receive_packet),
{ 0, 0 } { 0, 0 }
}; };
@@ -159,4 +158,3 @@ abtn_receive_packet(device_t dev, u_char status,
} }
return 0; return 0;
} }
-2
View File
@@ -102,7 +102,6 @@ static device_method_t adb_kbd_methods[] = {
/* ADB interface */ /* ADB interface */
DEVMETHOD(adb_receive_packet, adb_kbd_receive_packet), DEVMETHOD(adb_receive_packet, adb_kbd_receive_packet),
{ 0, 0 } { 0, 0 }
}; };
@@ -890,4 +889,3 @@ adb_fn_keys(SYSCTL_HANDLER_ARGS)
} }
DEV_MODULE(akbd, akbd_modevent, NULL); DEV_MODULE(akbd, akbd_modevent, NULL);
-6
View File
@@ -107,7 +107,6 @@ static device_method_t adb_mouse_methods[] = {
/* ADB interface */ /* ADB interface */
DEVMETHOD(adb_receive_packet, adb_mouse_receive_packet), DEVMETHOD(adb_receive_packet, adb_mouse_receive_packet),
{ 0, 0 } { 0, 0 }
}; };
@@ -509,13 +508,11 @@ ams_read(struct cdev *dev, struct uio *uio, int flag)
if (!sc->packet_read_len) { if (!sc->packet_read_len) {
if (sc->xdelta == 0 && sc->ydelta == 0 && if (sc->xdelta == 0 && sc->ydelta == 0 &&
sc->buttons == sc->last_buttons) { sc->buttons == sc->last_buttons) {
if (flag & O_NONBLOCK) { if (flag & O_NONBLOCK) {
mtx_unlock(&sc->sc_mtx); mtx_unlock(&sc->sc_mtx);
return EWOULDBLOCK; return EWOULDBLOCK;
} }
/* Otherwise, block on new data */ /* Otherwise, block on new data */
error = cv_wait_sig(&sc->sc_cv, &sc->sc_mtx); error = cv_wait_sig(&sc->sc_cv, &sc->sc_mtx);
if (error) { if (error) {
@@ -557,7 +554,6 @@ ams_read(struct cdev *dev, struct uio *uio, int flag)
sc->packet[7] = ~((uint8_t)(sc->buttons >> 3)) & 0x7f; sc->packet[7] = ~((uint8_t)(sc->buttons >> 3)) & 0x7f;
sc->last_buttons = sc->buttons; sc->last_buttons = sc->buttons;
sc->xdelta = 0; sc->xdelta = 0;
sc->ydelta = 0; sc->ydelta = 0;
@@ -579,7 +575,6 @@ ams_read(struct cdev *dev, struct uio *uio, int flag)
return (error); return (error);
} }
static int static int
ams_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, ams_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
struct thread *p) struct thread *p)
@@ -646,7 +641,6 @@ ams_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
sc->last_buttons = sc->buttons; sc->last_buttons = sc->buttons;
mtx_unlock(&sc->sc_mtx); mtx_unlock(&sc->sc_mtx);
break; } break; }
default: default:
return ENOTTY; return ENOTTY;
-1
View File
@@ -36,7 +36,6 @@ enum {
ADB_COMMAND_BUS_RESET = 0 ADB_COMMAND_BUS_RESET = 0
}; };
struct adb_softc { struct adb_softc {
device_t sc_dev; device_t sc_dev;
device_t parent; device_t parent;