Commit Graph

245 Commits

Author SHA1 Message Date
christos
e7ae23fd9e include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
ozaki-r
a27b421700 Add missing semicolon 2015-04-07 01:24:32 +00:00
christos
1a163254a9 fix leak, found by Brainy. 2015-04-04 15:33:36 +00:00
dholland
f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
dholland
a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
christos
d2d9a4a6f5 fix unused variable warning 2013-11-09 21:31:56 +00:00
christos
96aaef2d65 fixed unused variable warning 2013-11-09 02:44:52 +00:00
christos
92ee2313b4 fix uninitialized pointer. This could have never worked.
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html
2013-06-28 14:44:15 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
christos
a24d023052 remove diagnostic printfs to make this compile again. 2012-10-03 23:55:22 +00:00
dsl
5eb5222cc8 Remove code from dev/apm/apm.c for setting global variables to parameterise
the i386 bios apm code (now removed).
Remove the same code from the clone dev/hpc/apm/apmdev.c
Remove some not-used options from dev/apm/files.apm and the commented out
  lines in ALL and GENERIC.
Maybe the APM_V10_ONLY and APM_NO_V12 could also be shot, but they are
  further entwined in the code.
2012-09-30 21:36:18 +00:00
matt
1d7f24ead8 Change old-style function defintions to C89 prototypes.
Approved by releng.
2012-02-12 16:34:06 +00:00
kiyohara
587ef94054 Add support for PSIONTEKLOGIX NETBOOK PRO. 2011-08-06 03:53:40 +00:00
joerg
3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
nonaka
51ff92dd24 split device_t/softc. 2011-06-11 16:34:36 +00:00
uebayasi
8184d5dc03 Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.
2010-11-13 13:51:57 +00:00
tsutsui
f928eeabe2 Replace powerhook_establish(9) with pmf(9). 2010-08-01 02:47:43 +00:00
tsutsui
9a7de9c704 Remove deprecated powerhook_establish(9) since apmdev(4) which required
the old API was gone.
2010-08-01 02:43:12 +00:00
tsutsui
d7da5944ed Add WSDISPLAYIO_LINEBYTES, which is required by Xorg wsfb server. 2010-06-18 09:11:44 +00:00
nonaka
250a759ede Added WS020SH keymap. 2010-05-23 11:57:04 +00:00
tsutsui
a9edf8145e Clear RI_NO_AUTO in actual attach functions during autoconf(9)
for console devices that set the flag during consinit().
2010-05-15 08:53:26 +00:00
tsutsui
67dfc8da50 Set RI_NO_AUTO in ri->ri_flg if hpcfb_init() is invoked from cnattach.
Fixes silent hang on hpcsh and hpcmips.

XXX: all other rasops based console devices need to set this flag??
2010-05-15 06:01:12 +00:00
nonaka
b62fc9e203 Added Sharp W-ZERO3 series support. 2010-04-17 13:36:21 +00:00
dyoung
c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
dyoung
cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
rmind
dbd9b86792 Remove some unecessary includes sys/user.h header. 2009-11-23 02:13:44 +00:00
cegger
529e91fca1 struct device * -> device_t, no functional changes intended. 2009-05-12 14:16:35 +00:00
cegger
32c4940900 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 12:10:29 +00:00
uwe
b22b1f73c6 Register with pmf(9), tell it we don't need anything. 2009-04-05 02:17:18 +00:00
uwe
fd239c627a Register with pmf(9). Thus we register with both dopowerhooks(9) and
pmf(9), but they are mutually exclusive (apm(4) vs apmdev(4)).

Express pmf(9) hooks in terms of dopowerhooks(9) hook - the reverse
would be more natural, but pmf hook signature is hidden behind
PMF_FN_ARGS/PMF_FN_CALL, so just go the least intrusive way for now.
2009-04-05 02:14:41 +00:00
uwe
2ec6410a85 Register with pmf(9), tell it we don't need anything. 2009-04-05 02:04:40 +00:00
uwe
12a9718711 Split device_t and softc. 2009-04-05 01:48:47 +00:00
uwe
fe0f5148ae Register with pmf(9), tell it we don't need anything.
btnmgr(4) is just a hub for other devices to plug into with
config_hook(9), there is no real hardware to manage.
2009-04-05 00:34:42 +00:00
uwe
30f9f983a3 Use dev/apm/files.apm for APM options in opt_apm.h.
Now both apm and apmdev files.apm can be included so you can switch
from apmdev0 to apm0 at hpcapm0 in your kernel config easily.
2009-04-03 05:01:09 +00:00
uwe
c03d662b39 Config glue for attaching apm at apmdevif.
Unfortunately dev/apm/files.apm and dev/hpc/apm/files.apm cannot be
included both at the same time (they define same options and config(1)
complains), so you need to comment out old code and uncomment new code
to be able to replace "apmdev0 at hpcapm0" with "apm0 at hpcapm0" in
your kernel config.
2009-04-03 04:21:51 +00:00
uwe
ea06597b80 Attachment glue to attach apm0 at hpcapm0.
Tested on Jornada 690.
2009-04-03 04:17:03 +00:00
uwe
9a25b0cb7f Switch apmdev to use apm(4) structures from dev/apm/apmvar.h.
Add batteryid argument to aa_get_powstat method implementations.
2009-04-03 04:13:17 +00:00
uwe
7cbde2c0d5 Further reduce diffs to dev/apm/apm.c.
Bring over remaining bits of logic not picked up in the first round.
Main semantic difference between the two that ramins is now basically
powerhooks vs. pmf.

Cosmetics to reduce diff noise: split apmattach into apmdevattach and
apm_attach, where the latter matches its counterpart in the real
apm.c.  Change local macros names from APMDEV* to APM*

Now that apmdev.c is demonstrably congruent to apm.c it should be
easier to switch hpc* and zaurus ports to apm.c from apmdev.c.
apmdev.c is one of the only two remaining drivers that call
dopowerhooks(9), the other one being arch/arm/xscale/pxa2x0_apm.c.

Ideally I would prefer for them to be interchangeable to smooth the
transition (in pmf world order *all* devices must have pmf hooks
registered), but they are attached differently - apmdev is separate
from its backend device (like hpcapm), while apm.c backends are
attachment glue, not separate devices.
2009-04-03 02:08:38 +00:00
uwe
1cfa6cdc4e Split device_t and softc, use aprint_*, rename/reformat stuff to
minimize diffs to dev/apm/apm.c (even at the cost of uglification).

Tested on Jornada 690 (hpcsh).
2009-03-30 06:22:25 +00:00
uwe
e4d63225a1 Fix battery_state vs. battery_flags confusion.
Fill all fields of struct apm_power_info in hpcapm_get_powstat.
2009-03-30 06:17:39 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
rafal
cf990769f1 device_private_lookup()-ification so that hpcarm (at jeast Jornada 72x)
kernels build.
2008-06-12 01:46:32 +00:00
drochner
1f0a423884 use new "defpseudodev" where appropriate, and remove dummy interface
attribute definitions which were only to trick config(8)
2008-06-10 12:49:16 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger
0e50a9464d use aprint_*_dev and device_xname 2008-04-06 20:25:59 +00:00
rmind
c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
uwe
8022c855dd Rasops and wsfont are now in MI conf/files so remove them from here. 2008-02-21 19:52:00 +00:00
ad
549e8ec8b9 Has this compiled recently? 2008-01-30 14:12:20 +00:00
uwe
d8f0d4be74 Catch up with new option to dev/pckbport/wskbdmap_mfii.c 2008-01-07 00:19:08 +00:00