Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22567 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-10-15 12:48:22 +00:00
parent c0737fa86d
commit 4c437c0fc7
4 changed files with 43 additions and 64 deletions

View File

@ -1,25 +1,25 @@
//------------------------------------------------------------------------------ /*
// Copyright (c) 2003-2004, Niels S. Reedijk, * Copyright (c) 2003-2004, Niels S. Reedijk,
// Rudolf Cornelissen * Rudolf Cornelissen
// *
// Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation * to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, * the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the * and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions: * Software is furnished to do so, subject to the following conditions:
// *
// The above copyright notice and this permission notice shall be included in * The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software. * all copies or substantial portions of the Software.
// *
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/
#include "agp.h" #include "agp.h"
@ -27,10 +27,6 @@
void silent(const char *, ... ) {} void silent(const char *, ... ) {}
/* ++++++++++
Loading/unloading the module
++++++++++ */
static int32 static int32
bus_std_ops(int32 op, ...) bus_std_ops(int32 op, ...)
{ {
@ -38,9 +34,7 @@ bus_std_ops(int32 op, ...)
case B_MODULE_INIT: case B_MODULE_INIT:
TRACE("agp_man: bus module V0.02: init\n"); TRACE("agp_man: bus module V0.02: init\n");
if (init() != B_OK) if (init() != B_OK)
{
return ENODEV; return ENODEV;
}
break; break;
case B_MODULE_UNINIT: case B_MODULE_UNINIT:
TRACE("agp_man: bus module V0.02: uninit\n"); TRACE("agp_man: bus module V0.02: uninit\n");
@ -53,28 +47,20 @@ bus_std_ops(int32 op, ...)
} }
/* ++++++++++ static struct agp_module_info sAGPModuleInfo = {
This module exports the AGP API
++++++++++ */
struct agp_module_info m_module_info =
{
// First the bus_manager_info:
{ {
//module_info
{ {
B_AGP_MODULE_NAME , B_AGP_MODULE_NAME,
B_KEEP_LOADED , // Keep loaded, even if no driver requires it B_KEEP_LOADED, // Keep loaded, even if no driver requires it
bus_std_ops bus_std_ops
} , },
NULL // the rescan function NULL // the rescan function
} , },
//my functions
get_nth_agp_info, get_nth_agp_info,
enable_agp enable_agp
}; };
_EXPORT module_info *modules[] = { module_info *modules[] = {
(module_info *)&m_module_info , (module_info *)&sAGPModuleInfo,
NULL NULL
}; };

View File

@ -1,15 +1,9 @@
/* /*
** Copyright 2002/03, Thomas Kurschel. All rights reserved. * Copyright 2002/03, Thomas Kurschel. All rights reserved.
** Distributed under the terms of the OpenBeOS License. * Distributed under the terms of the MIT License.
*/ */
/* /*! Contains interface used by IDE controller driver. */
Part of Open IDE bus manager
Main file
Contains interface used by IDE controller driver.
*/
#include "ide_internal.h" #include "ide_internal.h"
#include "ide_sim.h" #include "ide_sim.h"
@ -19,7 +13,6 @@ device_manager_info *pnp;
#if !_BUILDING_kernel && !BOOT #if !_BUILDING_kernel && !BOOT
_EXPORT
module_info *modules[] = { module_info *modules[] = {
(module_info *)&ide_for_controller_module, (module_info *)&ide_for_controller_module,
(module_info *)&ide_sim_module, (module_info *)&ide_sim_module,

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2005 Marcus Overhagen * Copyright 2005-2007 Marcus Overhagen
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* PS/2 bus manager * PS/2 bus manager
@ -8,17 +8,20 @@
* Marcus Overhagen (marcus@overhagen.de) * Marcus Overhagen (marcus@overhagen.de)
*/ */
#include "PS2.h" #include "PS2.h"
#include "ps2_common.h" #include "ps2_common.h"
static int32 function1() static int32
function1()
{ {
return 0; return 0;
} }
static int32 function2() static int32
function2()
{ {
return 0; return 0;
} }
@ -41,8 +44,7 @@ std_ops(int32 op, ...)
} }
static ps2_module_info ps2_module = static ps2_module_info ps2_module = {
{
.binfo = { .binfo = {
.minfo = { .minfo = {
.name = B_PS2_MODULE_NAME, .name = B_PS2_MODULE_NAME,
@ -56,8 +58,7 @@ static ps2_module_info ps2_module =
}; };
_EXPORT module_info *modules[] = module_info *modules[] = {
{ (module_info *)&ps2_module,
(module_info *) &ps2_module,
NULL NULL
}; };

View File

@ -586,7 +586,6 @@ locked_pool_interface interface = {
}; };
#if !_BUILDING_kernel && !BOOT #if !_BUILDING_kernel && !BOOT
_EXPORT
module_info *modules[] = { module_info *modules[] = {
&interface.minfo, &interface.minfo,
NULL NULL