Thu Jul 28 15:29:52 2011 UTC ()
appease gcc 4.5


(macallan)
diff -r1.161 -r1.162 src/sys/arch/macppc/macppc/machdep.c

cvs diff -r1.161 -r1.162 src/sys/arch/macppc/macppc/machdep.c (expand / switch to unified diff)

--- src/sys/arch/macppc/macppc/machdep.c 2011/07/13 22:54:33 1.161
+++ src/sys/arch/macppc/macppc/machdep.c 2011/07/28 15:29:52 1.162
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machdep.c,v 1.161 2011/07/13 22:54:33 macallan Exp $ */ 1/* $NetBSD: machdep.c,v 1.162 2011/07/28 15:29:52 macallan Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH. 5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 22 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.161 2011/07/13 22:54:33 macallan Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.162 2011/07/28 15:29:52 macallan Exp $");
36 36
37#include "opt_compat_netbsd.h" 37#include "opt_compat_netbsd.h"
38#include "opt_ddb.h" 38#include "opt_ddb.h"
39#include "opt_kgdb.h" 39#include "opt_kgdb.h"
40#include "opt_ipkdb.h" 40#include "opt_ipkdb.h"
41#include "opt_altivec.h" 41#include "opt_altivec.h"
42#include "opt_multiprocessor.h" 42#include "opt_multiprocessor.h"
43#include "adb.h" 43#include "adb.h"
44#include "zsc.h" 44#include "zsc.h"
45 45
46#include <sys/param.h> 46#include <sys/param.h>
47#include <sys/buf.h> 47#include <sys/buf.h>
48#include <sys/boot_flag.h> 48#include <sys/boot_flag.h>
@@ -337,35 +337,35 @@ copy_disp_props(device_t dev, int node,  @@ -337,35 +337,35 @@ copy_disp_props(device_t dev, int node,
337 /* not let's look for backlight control */ 337 /* not let's look for backlight control */
338 have_backlight = 0; 338 have_backlight = 0;
339 if (OF_getprop(node, "backlight-control", &temp, sizeof(temp)) == 4) { 339 if (OF_getprop(node, "backlight-control", &temp, sizeof(temp)) == 4) {
340 have_backlight = 1; 340 have_backlight = 1;
341 } else if (OF_getprop(OF_parent(node), "backlight-control", &temp,  341 } else if (OF_getprop(OF_parent(node), "backlight-control", &temp,
342 sizeof(temp)) == 4) { 342 sizeof(temp)) == 4) {
343 have_backlight = 1; 343 have_backlight = 1;
344 } 344 }
345 if (have_backlight) { 345 if (have_backlight) {
346 gpc_backlight.gpc_cookie = (void *)console_instance; 346 gpc_backlight.gpc_cookie = (void *)console_instance;
347 gpc_backlight.gpc_set_parameter = of_set_backlight; 347 gpc_backlight.gpc_set_parameter = of_set_backlight;
348 gpc_backlight.gpc_get_parameter = of_get_backlight; 348 gpc_backlight.gpc_get_parameter = of_get_backlight;
349 gpc_backlight.gpc_upd_parameter = NULL; 349 gpc_backlight.gpc_upd_parameter = NULL;
350 backlight_cb = (uint64_t)&gpc_backlight; 350 backlight_cb = (uint64_t)(uintptr_t)&gpc_backlight;
351 prop_dictionary_set_uint64(dict, "backlight_callback", 351 prop_dictionary_set_uint64(dict, "backlight_callback",
352 backlight_cb); 352 backlight_cb);
353 353
354 gpc_brightness.gpc_cookie = (void *)console_instance; 354 gpc_brightness.gpc_cookie = (void *)console_instance;
355 gpc_brightness.gpc_set_parameter = of_set_brightness; 355 gpc_brightness.gpc_set_parameter = of_set_brightness;
356 gpc_brightness.gpc_get_parameter = of_get_brightness; 356 gpc_brightness.gpc_get_parameter = of_get_brightness;
357 gpc_brightness.gpc_upd_parameter = of_upd_brightness; 357 gpc_brightness.gpc_upd_parameter = of_upd_brightness;
358 brightness_cb = (uint64_t)&gpc_brightness; 358 brightness_cb = (uint64_t)(uintptr_t)&gpc_brightness;
359 prop_dictionary_set_uint64(dict, "brightness_callback", 359 prop_dictionary_set_uint64(dict, "brightness_callback",
360 brightness_cb); 360 brightness_cb);
361 } 361 }
362} 362}
363 363
364static void 364static void
365add_model_specifics(prop_dictionary_t dict) 365add_model_specifics(prop_dictionary_t dict)
366{ 366{
367 const char *bl_rev_models[] = { 367 const char *bl_rev_models[] = {
368 "PowerBook4,3", "PowerBook6,3", "PowerBook6,5", NULL}; 368 "PowerBook4,3", "PowerBook6,3", "PowerBook6,5", NULL};
369 const char *pismo[] = { 369 const char *pismo[] = {
370 "PowerBook3,1", NULL}; 370 "PowerBook3,1", NULL};
371 int node; 371 int node;