Clean up bogus whitespace

This commit is contained in:
blymn 2006-05-26 11:52:08 +00:00
parent 305a7bfee2
commit 44278a4fa1
6 changed files with 97 additions and 97 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: hydra.c,v 1.20 2005/12/08 22:41:44 yamt Exp $ */
/* $NetBSD: hydra.c,v 1.21 2006/05/26 11:52:08 blymn Exp $ */
/*-
* Copyright (c) 2002 Ben Harris
@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@ -31,7 +31,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: hydra.c,v 1.20 2005/12/08 22:41:44 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: hydra.c,v 1.21 2006/05/26 11:52:08 blymn Exp $");
#include <sys/device.h>
#include <sys/systm.h>
@ -135,7 +135,7 @@ hydra_match(struct device *parent, struct cfdata *cf, void *aux)
fail:
bus_space_unmap(iot, ioh, HYDRA_PHYS_SIZE);
return 0;
return 0;
}
static void
@ -367,7 +367,7 @@ cpu_hydra_hatch(void)
cpu_setup(boot_args);
cpu_attach(curcpu()->ci_dev);
for (;;) {
for (;;) {
bus_space_write_1(iot, ioh,
HYDRA_HALT_SET, 1 << (cpunum & 3));
printf("%s: I am needed?\n", curcpu()->ci_dev->dv_xname);
@ -381,7 +381,7 @@ cpu_boot_secondary_processors(void)
struct hydra_softc *sc = the_hydra;
bus_space_tag_t iot = sc->sc_iot;
bus_space_handle_t ioh = sc->sc_ioh;
bus_space_write_1(iot, ioh, HYDRA_HALT_CLR, 0xf);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sed_saip.c,v 1.18 2006/03/04 16:51:56 peter Exp $ */
/* $NetBSD: sed_saip.c,v 1.19 2006/05/26 11:54:54 blymn Exp $ */
/*-
* Copyright (c) 1999-2001
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sed_saip.c,v 1.18 2006/03/04 16:51:56 peter Exp $");
__KERNEL_RCSID(0, "$NetBSD: sed_saip.c,v 1.19 2006/05/26 11:54:54 blymn Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -149,7 +149,7 @@ sed1356_attach(struct device *parent, struct device *self, void *aux)
printf(", console");
}
printf("\n");
printf("%s: framebuffer address: 0x%08lx\n",
printf("%s: framebuffer address: 0x%08lx\n",
sc->sc_dev.dv_xname, (u_long)bootinfo->fb_addr);
/* Add a suspend hook to power saving */
@ -303,7 +303,7 @@ sed1356_init(struct hpcfb_fbconf *fb)
return 0; /* no error */
}
static void
static void
sed1356_power(int why, void *arg)
{
struct sed1356_softc *sc = arg;
@ -327,13 +327,13 @@ sed1356_update_powerstate(struct sed1356_softc *sc, int updates)
if (updates & PWRSTAT_LCD)
config_hook_call(CONFIG_HOOK_POWERCONTROL,
CONFIG_HOOK_POWERCONTROL_LCD,
(void *)!(sc->sc_powerstate &
(void *)!(sc->sc_powerstate &
(PWRSTAT_VIDEOOFF|PWRSTAT_SUSPEND)));
if (updates & PWRSTAT_BACKLIGHT)
config_hook_call(CONFIG_HOOK_POWERCONTROL,
CONFIG_HOOK_POWERCONTROL_LCDLIGHT,
(void *)(!(sc->sc_powerstate &
(void *)(!(sc->sc_powerstate &
(PWRSTAT_VIDEOOFF|PWRSTAT_SUSPEND)) &&
(sc->sc_powerstate & PWRSTAT_BACKLIGHT)));
}
@ -353,7 +353,7 @@ sed1356_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
* XXX should be able to handle color map in 4/8 bpp mode.
*/
return EINVAL;
case WSDISPLAYIO_SVIDEO:
if (*(int *)data == WSDISPLAYIO_VIDEO_OFF)
sc->sc_powerstate |= PWRSTAT_VIDEOOFF;
@ -363,7 +363,7 @@ sed1356_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
return 0;
case WSDISPLAYIO_GVIDEO:
*(int *)data = (sc->sc_powerstate & PWRSTAT_VIDEOOFF) ?
*(int *)data = (sc->sc_powerstate & PWRSTAT_VIDEOOFF) ?
WSDISPLAYIO_VIDEO_OFF : WSDISPLAYIO_VIDEO_ON;
return 0;
@ -416,7 +416,7 @@ sed1356_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
" current=%d\n", sc->sc_max_brightness,
sc->sc_brightness));
return 0;
}
}
VPRINTF(("sed1356_ioctl: GET:BRIGHTNESS EINVAL\n"));
return EINVAL;
@ -474,7 +474,7 @@ sed1356_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
#ifdef SED_DEBUG
int org = sc->sc_contrast;
#endif
sed1356_set_contrast(sc, dispparam->curval);
sed1356_set_contrast(sc, dispparam->curval);
VPRINTF(("sed1356_ioctl: SET:CONTRAST org=%d,"
" current=%d\n", org, sc->sc_contrast));
return 0;
@ -492,7 +492,7 @@ sed1356_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
#ifdef SED_DEBUG
int org = sc->sc_brightness;
#endif
sed1356_set_brightness(sc, dispparam->curval);
sed1356_set_brightness(sc, dispparam->curval);
VPRINTF(("sed1356_ioctl: SET:BRIGHTNESS org=%d,"
" current=%d\n", org, sc->sc_brightness));
return 0;
@ -588,7 +588,7 @@ sed1356_init_backlight(struct sed1356_softc *sc, int inattach)
sc->sc_powerstate |= PWRSTAT_BACKLIGHT;
sc->sc_lcd_inited |= BACKLIGHT_INITED;
} else if (inattach) {
/*
/*
we cannot get real light state in attach time
because light device not yet attached.
we will retry in !inattach.
@ -629,7 +629,7 @@ sed1356_init_brightness(struct sed1356_softc *sc, int inattach)
}
sc->sc_lcd_inited |= BRIGHTNESS_INITED;
} else if (inattach) {
/*
/*
* we cannot get real brightness in attach time
* because brightness device not yet attached.
* we will retry in !inattach.
@ -670,7 +670,7 @@ sed1356_init_contrast(struct sed1356_softc *sc, int inattach)
}
sc->sc_lcd_inited |= CONTRAST_INITED;
} else if (inattach) {
/*
/*
* we cannot get real contrast in attach time
* because contrast device not yet attached.
* we will retry in !inattach.

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite8181.c,v 1.22 2005/12/11 12:17:33 christos Exp $ */
/* $NetBSD: ite8181.c,v 1.23 2006/05/26 11:56:26 blymn Exp $ */
/*-
* Copyright (c) 2000,2001 SATO Kazumi
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ite8181.c,v 1.22 2005/12/11 12:17:33 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ite8181.c,v 1.23 2006/05/26 11:56:26 blymn Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -86,7 +86,7 @@ int ite8181_lcd_control_disable = 0;
* IBM WorkPad z50 power unit has too weak power.
* So we must wait too many times to access some device
* after LCD panel and BackLight on.
* Currently delay is not enough ??? FIXME
* Currently delay is not enough ??? FIXME
*/
#ifndef ITE8181_LCD_ON_SELF_DELAY
#define ITE8181_LCD_ON_SELF_DELAY 1000
@ -175,7 +175,7 @@ inline int
ite8181_gui_read_1(struct ite8181_softc *sc, int byteoffset)
{
return (bus_space_read_1(sc->sc_iot, sc->sc_ioh,
return (bus_space_read_1(sc->sc_iot, sc->sc_ioh,
sc->sc_gba + byteoffset));
}
@ -191,7 +191,7 @@ inline int
ite8181_graphics_read_1(struct ite8181_softc *sc, int byteoffset)
{
return (bus_space_read_1(sc->sc_iot, sc->sc_ioh,
return (bus_space_read_1(sc->sc_iot, sc->sc_ioh,
sc->sc_sba + byteoffset));
}
@ -218,7 +218,7 @@ ite8181_ema_write_1(struct ite8181_softc *sc, int byteoffset, int data)
ite8181_graphics_write_1(sc, ITE8181_EMA_EXAX, byteoffset);
ite8181_graphics_write_1(sc, ITE8181_EMA_EXADATA, data);
}
int
ite8181_probe(bus_space_tag_t iot, bus_space_handle_t ioh)
{
@ -254,13 +254,13 @@ ite8181_attach(struct ite8181_softc *sc)
regval = ite8181_config_read_4(sc->sc_iot, sc->sc_ioh, ITE8181_CLASS);
printf("ITE8181 Rev.%02lx", regval & ITE8181_REV_MASK);
if (console) {
printf(", console");
printf(", console");
}
printf("\n");
printf("%s: framebuffer address: 0x%08lx\n",
printf("%s: framebuffer address: 0x%08lx\n",
sc->sc_dev.dv_xname, (u_long)bootinfo->fb_addr);
if (ite8181_lcd_control_disable)
printf("%s: ite8181 lcd control is DISABLED.\n",
printf("%s: ite8181 lcd control is DISABLED.\n",
sc->sc_dev.dv_xname);
/* set base offsets */
@ -335,7 +335,7 @@ ite8181_lcd_power(struct ite8181_softc *sc, int on)
}
if (sc->sc_lcd != on) {
ite8181_ema_write_1(sc, ITE8181_EMA_ENABLEEMA,
ite8181_ema_write_1(sc, ITE8181_EMA_ENABLEEMA,
ITE8181_EMA_ENABLEPASS);
lcd_p = ite8181_ema_read_1(sc, ITE8181_EMA_LCDPOWER);
lcd_s = ite8181_ema_read_1(sc, ITE8181_EMA_LCDPOWERSTAT);
@ -355,7 +355,7 @@ ite8181_lcd_power(struct ite8181_softc *sc, int on)
* IBM WorkPad z50 power unit has too weak power.
* So we must wait too many times to access self device
* after LCD panel and BackLight on.
* Currently delay is not enough ??? FIXME
* Currently delay is not enough ??? FIXME
*/
delay(ite8181_lcd_on_self_delay*MSEC);
while (loop--) {
@ -368,8 +368,8 @@ ite8181_lcd_power(struct ite8181_softc *sc, int on)
DPRINTFN(1,("ite8181_lcd_power(%d)%d| p=%x,"
" s=%x, seq=%x\n", on, loop, lcd_p, lcd_s,
lcd_seq));
/*
* XXX the states which are not described
/*
* XXX the states which are not described
* XXX in manual.
*/
if (!(lcd_s&ITE8181_LCDPSTANDBY) &&
@ -395,7 +395,7 @@ ite8181_lcd_power(struct ite8181_softc *sc, int on)
DPRINTFN(1,("ite8181_lcd_power(%d)%d| p=%x,"
" s=%x, seq=%x\n", on, loop, lcd_p, lcd_s,
lcd_seq));
/*
/*
* XXX the states which are not described
* XXX in manual.
*/
@ -416,7 +416,7 @@ ite8181_lcd_power(struct ite8181_softc *sc, int on)
ite8181_ema_read_1(sc, ITE8181_EMA_LCDPOWERSEQ)));
ite8181_ema_write_1(sc, ITE8181_EMA_ENABLEEMA,
ITE8181_EMA_DISABLEPASS);
}
}
return 0;
}
@ -433,18 +433,18 @@ ite8181_update_powerstate(struct ite8181_softc *sc, int updates)
if (updates & PWRSTAT_LCD)
config_hook_call(CONFIG_HOOK_POWERCONTROL,
CONFIG_HOOK_POWERCONTROL_LCD,
(void*)!(sc->sc_powerstate &
(void*)!(sc->sc_powerstate &
(PWRSTAT_VIDEOOFF|PWRSTAT_SUSPEND)));
if (updates & PWRSTAT_BACKLIGHT)
config_hook_call(CONFIG_HOOK_POWERCONTROL,
CONFIG_HOOK_POWERCONTROL_LCDLIGHT,
(void*)(!(sc->sc_powerstate &
(void*)(!(sc->sc_powerstate &
(PWRSTAT_VIDEOOFF|PWRSTAT_SUSPEND)) &&
(sc->sc_powerstate & PWRSTAT_BACKLIGHT)));
}
static void
static void
ite8181_power(int why, void *arg)
{
struct ite8181_softc *sc = arg;
@ -477,19 +477,19 @@ ite8181_hardpower(void *ctx, int type, long id, void *msg)
delay(MSEC);
break;
case PWR_SUSPEND:
ite8181_lcd_power(sc, 0);
ite8181_lcd_power(sc, 0);
delay(MSEC);
break;
case PWR_RESUME:
delay(MSEC);
ite8181_lcd_power(sc, 1);
ite8181_lcd_power(sc, 1);
/*
* XXX:
* IBM WorkPad z50 power unit has too weak power.
* So we must wait too many times to access other devices
* after LCD panel and BackLight on.
*/
delay(ite8181_lcd_on_delay*MSEC);
delay(ite8181_lcd_on_delay*MSEC);
break;
}
@ -673,7 +673,7 @@ ite8181_ioctl(v, cmd, data, flag, l)
* This driver can't set color map.
*/
return (EINVAL);
case WSDISPLAYIO_SVIDEO:
if (*(int *)data == WSDISPLAYIO_VIDEO_OFF)
sc->sc_powerstate |= PWRSTAT_VIDEOOFF;
@ -683,7 +683,7 @@ ite8181_ioctl(v, cmd, data, flag, l)
return 0;
case WSDISPLAYIO_GVIDEO:
*(int *)data = (sc->sc_powerstate&PWRSTAT_VIDEOOFF) ?
*(int *)data = (sc->sc_powerstate&PWRSTAT_VIDEOOFF) ?
WSDISPLAYIO_VIDEO_OFF:WSDISPLAYIO_VIDEO_ON;
return 0;
@ -700,7 +700,7 @@ ite8181_ioctl(v, cmd, data, flag, l)
dispparam->min = 0;
dispparam->max = 1;
if (sc->sc_max_brightness > 0)
dispparam->curval =
dispparam->curval =
sc->sc_brightness > 0 ? 1: 0;
else
dispparam->curval =
@ -727,7 +727,7 @@ ite8181_ioctl(v, cmd, data, flag, l)
"GET:CONTRAST EINVAL\n"));
return (EINVAL);
}
break;
break;
case WSDISPLAYIO_PARAM_BRIGHTNESS:
VPRINTF(("ite8181_ioctl: GET:BRIGHTNESS\n"));
ite8181_init_brightness(sc, 0);
@ -909,7 +909,7 @@ ite8181_init_backlight(struct ite8181_softc *sc, int inattach)
if (sc->sc_lcd_inited&BACKLIGHT_INITED)
return;
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_POWER_LCDLIGHT, &val) != -1) {
/* we can get real light state */
VPRINTF(("ite8181_init_backlight: real backlight=%d\n", val));
@ -919,7 +919,7 @@ ite8181_init_backlight(struct ite8181_softc *sc, int inattach)
sc->sc_powerstate |= PWRSTAT_BACKLIGHT;
sc->sc_lcd_inited |= BACKLIGHT_INITED;
} else if (inattach) {
/*
/*
we cannot get real light state in attach time
because light device not yet attached.
we will retry in !inattach.
@ -941,14 +941,14 @@ ite8181_init_brightness(struct ite8181_softc *sc, int inattach)
return;
VPRINTF(("ite8181_init_brightness\n"));
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_BRIGHTNESS_MAX, &val) != -1) {
/* we can get real brightness max */
VPRINTF(("ite8181_init_brightness: real brightness max=%d\n",
val));
sc->sc_max_brightness = val;
val = -1;
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_BRIGHTNESS, &val) != -1) {
/* we can get real brightness */
VPRINTF(("ite8181_init_brightness:"
@ -960,7 +960,7 @@ ite8181_init_brightness(struct ite8181_softc *sc, int inattach)
}
sc->sc_lcd_inited |= BRIGHTNESS_INITED;
} else if (inattach) {
/*
/*
we cannot get real brightness in attach time
because brightness device not yet attached.
we will retry in !inattach.
@ -985,13 +985,13 @@ ite8181_init_contrast(struct ite8181_softc *sc, int inattach)
return;
VPRINTF(("ite8181_init_contrast\n"));
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_CONTRAST_MAX, &val) != -1) {
/* we can get real contrast max */
VPRINTF(("ite8181_init_contrast: real contrast max=%d\n", val));
sc->sc_max_contrast = val;
val = -1;
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_CONTRAST, &val) != -1) {
/* we can get real contrast */
VPRINTF(("ite8181_init_contrast: real contrast=%d\n",
@ -1002,7 +1002,7 @@ ite8181_init_contrast(struct ite8181_softc *sc, int inattach)
}
sc->sc_lcd_inited |= CONTRAST_INITED;
} else if (inattach) {
/*
/*
we cannot get real contrast in attach time
because contrast device not yet attached.
we will retry in !inattach.
@ -1025,7 +1025,7 @@ ite8181_set_brightness(struct ite8181_softc *sc, int val)
sc->sc_brightness = val;
config_hook_call(CONFIG_HOOK_SET, CONFIG_HOOK_BRIGHTNESS, &val);
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_BRIGHTNESS, &val) != -1) {
sc->sc_brightness = val;
}
@ -1038,7 +1038,7 @@ ite8181_set_contrast(struct ite8181_softc *sc, int val)
sc->sc_contrast = val;
config_hook_call(CONFIG_HOOK_SET, CONFIG_HOOK_CONTRAST, &val);
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_CONTRAST, &val) != -1) {
sc->sc_contrast = val;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mq200.c,v 1.25 2005/12/11 12:17:33 christos Exp $ */
/* $NetBSD: mq200.c,v 1.26 2006/05/26 11:57:25 blymn Exp $ */
/*-
* Copyright (c) 2000, 2001 TAKEMURA Shin
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mq200.c,v 1.25 2005/12/11 12:17:33 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mq200.c,v 1.26 2006/05/26 11:57:25 blymn Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: mq200.c,v 1.25 2005/12/11 12:17:33 christos Exp $");
#include "bivideo.h"
#if NBIVIDEO > 0
#include <dev/hpc/bivideovar.h>
#include <dev/hpc/bivideovar.h>
#endif
/*
@ -196,7 +196,7 @@ mq200_attach(struct mq200_softc *sc)
mq200_dump_pll(sc);
}
#endif
/* Add a power hook to power saving */
sc->sc_mq200pwstate = MQ200_POWERSTATE_D0;
sc->sc_powerhook = powerhook_establish(mq200_power, sc);
@ -250,18 +250,18 @@ mq200_update_powerstate(struct mq200_softc *sc, int updates)
if (updates & PWRSTAT_LCD)
config_hook_call(CONFIG_HOOK_POWERCONTROL,
CONFIG_HOOK_POWERCONTROL_LCD,
(void*)!(sc->sc_powerstate &
(void*)!(sc->sc_powerstate &
(PWRSTAT_VIDEOOFF|PWRSTAT_SUSPEND)));
if (updates & PWRSTAT_BACKLIGHT)
config_hook_call(CONFIG_HOOK_POWERCONTROL,
CONFIG_HOOK_POWERCONTROL_LCDLIGHT,
(void*)(!(sc->sc_powerstate &
(void*)(!(sc->sc_powerstate &
(PWRSTAT_VIDEOOFF|PWRSTAT_SUSPEND)) &&
(sc->sc_powerstate & PWRSTAT_BACKLIGHT)));
}
static void
static void
mq200_power(int why, void *arg)
{
struct mq200_softc *sc = arg;
@ -495,7 +495,7 @@ mq200_ioctl(v, cmd, data, flag, l)
* This driver can't set color map.
*/
return (EINVAL);
case WSDISPLAYIO_SVIDEO:
if (*(int *)data == WSDISPLAYIO_VIDEO_OFF)
sc->sc_powerstate |= PWRSTAT_VIDEOOFF;
@ -505,7 +505,7 @@ mq200_ioctl(v, cmd, data, flag, l)
return 0;
case WSDISPLAYIO_GVIDEO:
*(int *)data = (sc->sc_powerstate&PWRSTAT_VIDEOOFF) ?
*(int *)data = (sc->sc_powerstate&PWRSTAT_VIDEOOFF) ?
WSDISPLAYIO_VIDEO_OFF:WSDISPLAYIO_VIDEO_ON;
return 0;
@ -547,7 +547,7 @@ mq200_ioctl(v, cmd, data, flag, l)
VPRINTF("ioctl: GET:CONTRAST EINVAL\n");
return (EINVAL);
}
break;
break;
case WSDISPLAYIO_PARAM_BRIGHTNESS:
VPRINTF("ioctl: GET:BRIGHTNESS\n");
mq200_init_brightness(sc, 0);
@ -726,7 +726,7 @@ mq200_init_backlight(struct mq200_softc *sc, int inattach)
if (sc->sc_lcd_inited&BACKLIGHT_INITED)
return;
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_POWER_LCDLIGHT, &val) != -1) {
/* we can get real light state */
VPRINTF("init_backlight: real backlight=%d\n", val);
@ -736,7 +736,7 @@ mq200_init_backlight(struct mq200_softc *sc, int inattach)
sc->sc_powerstate |= PWRSTAT_BACKLIGHT;
sc->sc_lcd_inited |= BACKLIGHT_INITED;
} else if (inattach) {
/*
/*
we cannot get real light state in attach time
because light device not yet attached.
we will retry in !inattach.
@ -758,13 +758,13 @@ mq200_init_brightness(struct mq200_softc *sc, int inattach)
return;
VPRINTF("init_brightness\n");
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_BRIGHTNESS_MAX, &val) != -1) {
/* we can get real brightness max */
VPRINTF("init_brightness: real brightness max=%d\n", val);
sc->sc_max_brightness = val;
val = -1;
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_BRIGHTNESS, &val) != -1) {
/* we can get real brightness */
VPRINTF("init_brightness: real brightness=%d\n", val);
@ -775,7 +775,7 @@ mq200_init_brightness(struct mq200_softc *sc, int inattach)
}
sc->sc_lcd_inited |= BRIGHTNESS_INITED;
} else if (inattach) {
/*
/*
we cannot get real brightness in attach time
because brightness device not yet attached.
we will retry in !inattach.
@ -801,13 +801,13 @@ mq200_init_contrast(struct mq200_softc *sc, int inattach)
return;
VPRINTF("init_contrast\n");
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_CONTRAST_MAX, &val) != -1) {
/* we can get real contrast max */
VPRINTF("init_contrast: real contrast max=%d\n", val);
sc->sc_max_contrast = val;
val = -1;
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_CONTRAST, &val) != -1) {
/* we can get real contrast */
VPRINTF("init_contrast: real contrast=%d\n", val);
@ -817,7 +817,7 @@ mq200_init_contrast(struct mq200_softc *sc, int inattach)
}
sc->sc_lcd_inited |= CONTRAST_INITED;
} else if (inattach) {
/*
/*
we cannot get real contrast in attach time
because contrast device not yet attached.
we will retry in !inattach.
@ -839,7 +839,7 @@ mq200_set_brightness(struct mq200_softc *sc, int val)
sc->sc_brightness = val;
config_hook_call(CONFIG_HOOK_SET, CONFIG_HOOK_BRIGHTNESS, &val);
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_BRIGHTNESS, &val) != -1) {
sc->sc_brightness = val;
}
@ -851,7 +851,7 @@ mq200_set_contrast(struct mq200_softc *sc, int val)
sc->sc_contrast = val;
config_hook_call(CONFIG_HOOK_SET, CONFIG_HOOK_CONTRAST, &val);
if (config_hook_call(CONFIG_HOOK_GET,
if (config_hook_call(CONFIG_HOOK_GET,
CONFIG_HOOK_CONTRAST, &val) != -1) {
sc->sc_contrast = val;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: vrpiu.c,v 1.35 2005/12/11 12:17:35 christos Exp $ */
/* $NetBSD: vrpiu.c,v 1.36 2006/05/26 12:02:26 blymn Exp $ */
/*
* Copyright (c) 1999-2003 TAKEMURA Shin All rights reserved.
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vrpiu.c,v 1.35 2005/12/11 12:17:35 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: vrpiu.c,v 1.36 2006/05/26 12:02:26 blymn Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -307,7 +307,7 @@ vrpiu_init(struct vrpiu_softc *sc, void *aux)
#endif
/* install interrupt handler and enable interrupt */
if (!(sc->sc_handler =
if (!(sc->sc_handler =
vrip_intr_establish(sc->sc_vrip, sc->sc_unit, 0, IPL_TTY,
vrpiu_intr, sc))) {
printf (": can't map interrupt line.\n");
@ -331,7 +331,7 @@ vrpiu_init(struct vrpiu_softc *sc, void *aux)
* power management events
*/
sc->sc_power_hook = powerhook_establish(vrpiu_power, sc);
/*
* init A/D port polling.
*/
@ -363,7 +363,7 @@ scan_interval(u_int data)
scale = WSMOUSE_RES_MAX - WSMOUSE_RES_MIN;
data += WSMOUSE_RES_MIN;
return PIUSIVL_SCANINTVAL_MIN +
return PIUSIVL_SCANINTVAL_MIN +
(PIUSIVL_SCANINTVAL_MAX - PIUSIVL_SCANINTVAL_MIN) *
(scale - data) / scale;
}
@ -530,14 +530,14 @@ vrpiu_tp_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
vrpiu_tp_disable(sc);
if (ad_enable)
vrpiu_ad_disable(sc);
sc->sc_interval = scan_interval(*(u_int *)data);
DPRINTF(("%s(%d): WSMOUSEIO_SRES: *data=%d, interval=0x%03x\n",
__FILE__, __LINE__, *(u_int *)data, sc->sc_interval));
if (sc->sc_interval < PIUSIVL_SCANINTVAL_MIN)
sc->sc_interval = PIUSIVL_SCANINTVAL_MIN;
if (PIUSIVL_SCANINTVAL_MAX < sc->sc_interval)
sc->sc_interval = PIUSIVL_SCANINTVAL_MAX;
@ -688,7 +688,7 @@ vrpiu_tp_intr(struct vrpiu_softc *sc)
xraw = tpy1 * sc->sc_pb_paddata_max / (tpy0 + tpy1);
yraw = tpx1 * sc->sc_pb_paddata_max / (tpx0 + tpx1);
DPRINTF(("%3d %3d", xraw, yraw));
tpcalib_trans(&sc->sc_tpcalib, xraw,
yraw, &x, &y);
@ -820,10 +820,10 @@ vrpiu_calc_powerstate(struct vrpiu_softc *sc)
vrpiu_start_powerstate, sc);
if (bootverbose)
vrgiu_diff_io();
}
static void
static void
vrpiu_power(int why, void *arg)
{
struct vrpiu_softc *sc = arg;
@ -847,11 +847,11 @@ vrpiu_send_battery_event(struct vrpiu_softc *sc)
static int batterylow = 0;
static int critical = 0;
if (sc->sc_battery_spec == NULL
if (sc->sc_battery_spec == NULL
|| sc->sc_battery_spec->main_port == -1)
return;
if (sc->sc_battery.value[sc->sc_battery_spec->main_port]
if (sc->sc_battery.value[sc->sc_battery_spec->main_port]
<= sc->sc_battery_spec->dc_critical) {
batteryhigh = 0;
config_hook_call(CONFIG_HOOK_PMEVENT,
@ -866,7 +866,7 @@ vrpiu_send_battery_event(struct vrpiu_softc *sc)
batterylow = 0;
}
critical++;
} else if (sc->sc_battery.value[sc->sc_battery_spec->main_port]
} else if (sc->sc_battery.value[sc->sc_battery_spec->main_port]
<= sc->sc_battery_spec->dc_20p) {
batteryhigh = 0;
if (batterylow == 1)
@ -877,7 +877,7 @@ vrpiu_send_battery_event(struct vrpiu_softc *sc)
CONFIG_HOOK_PMEVENT_BATTERY,
(void *)CONFIG_HOOK_BATT_LOW);
batterylow = 2;
} else if (sc->sc_battery.value[sc->sc_battery_spec->main_port]
} else if (sc->sc_battery.value[sc->sc_battery_spec->main_port]
<= sc->sc_battery_spec->dc_50p) {
batteryhigh = 0;
if (batterylow == 0) {
@ -886,7 +886,7 @@ vrpiu_send_battery_event(struct vrpiu_softc *sc)
CONFIG_HOOK_PMEVENT_BATTERY,
(void *)CONFIG_HOOK_BATT_50P);
}
} else if (sc->sc_battery.value[sc->sc_battery_spec->main_port]
} else if (sc->sc_battery.value[sc->sc_battery_spec->main_port]
>= sc->sc_battery_spec->ac_80p) {
batterylow = 0;
if (batteryhigh == 0) {
@ -898,7 +898,7 @@ vrpiu_send_battery_event(struct vrpiu_softc *sc)
CONFIG_HOOK_PMEVENT_BATTERY,
(void *)CONFIG_HOOK_BATT_HIGH);
}
}
}
#else /* VRPIU_ADHOC_BATTERY_EVENT */
config_hook_call(CONFIG_HOOK_SET,
CONFIG_HOOK_BATTERYVAL,

View File

@ -1,4 +1,4 @@
/* $NetBSD: an.c,v 1.43 2006/05/14 21:42:27 elad Exp $ */
/* $NetBSD: an.c,v 1.44 2006/05/26 12:31:22 blymn Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: an.c,v 1.43 2006/05/14 21:42:27 elad Exp $");
__KERNEL_RCSID(0, "$NetBSD: an.c,v 1.44 2006/05/26 12:31:22 blymn Exp $");
#include "bpfilter.h"
@ -321,8 +321,8 @@ an_attach(struct an_softc *sc)
ieee80211_media_init(ic, an_media_change, an_media_status);
/*
* radiotap BPF device
/*
* radiotap BPF device
*/
#if NBPFILTER > 0
bpfattach2(ifp, DLT_IEEE802_11_RADIO,
@ -1514,7 +1514,7 @@ an_rx_intr(struct an_softc *sc)
(le16toh(frmhdr.an_rx_status) & AN_STAT_ERRSTAT) ||
(le16toh(frmhdr.an_rx_status) & AN_STAT_UNDECRYPTABLE))
tap->ar_flags |= IEEE80211_RADIOTAP_F_BADFCS;
bpf_mtap2(sc->sc_drvbpf, tap, tap->ar_ihdr.it_len, m);
}
#endif