via-pmu-backlight.c (f838bad1b3be8ca0c785ee0e0c570dfda74cf377) via-pmu-backlight.c (71a157e8edca55198e808f8561dd49017a54ee34)
1/*
2 * Backlight code for via-pmu
3 *
4 * Copyright (C) 1998 Paul Mackerras and Fabio Riccardi.
5 * Copyright (C) 2001-2002 Benjamin Herrenschmidt
6 * Copyright (C) 2006 Michael Hanselmann <linux-kernel@hansmi.ch>
7 *
8 */

--- 136 unchanged lines hidden (view full) ---

145void __init pmu_backlight_init()
146{
147 struct backlight_device *bd;
148 char name[10];
149 int level, autosave;
150
151 /* Special case for the old PowerBook since I can't test on it */
152 autosave =
1/*
2 * Backlight code for via-pmu
3 *
4 * Copyright (C) 1998 Paul Mackerras and Fabio Riccardi.
5 * Copyright (C) 2001-2002 Benjamin Herrenschmidt
6 * Copyright (C) 2006 Michael Hanselmann <linux-kernel@hansmi.ch>
7 *
8 */

--- 136 unchanged lines hidden (view full) ---

145void __init pmu_backlight_init()
146{
147 struct backlight_device *bd;
148 char name[10];
149 int level, autosave;
150
151 /* Special case for the old PowerBook since I can't test on it */
152 autosave =
153 machine_is_compatible("AAPL,3400/2400") ||
154 machine_is_compatible("AAPL,3500");
153 of_machine_is_compatible("AAPL,3400/2400") ||
154 of_machine_is_compatible("AAPL,3500");
155
156 if (!autosave &&
157 !pmac_has_backlight_type("pmu") &&
155
156 if (!autosave &&
157 !pmac_has_backlight_type("pmu") &&
158 !machine_is_compatible("AAPL,PowerBook1998") &&
159 !machine_is_compatible("PowerBook1,1"))
158 !of_machine_is_compatible("AAPL,PowerBook1998") &&
159 !of_machine_is_compatible("PowerBook1,1"))
160 return;
161
162 snprintf(name, sizeof(name), "pmubl");
163
164 bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data);
165 if (IS_ERR(bd)) {
166 printk(KERN_ERR "PMU Backlight registration failed\n");
167 return;

--- 24 unchanged lines hidden ---
160 return;
161
162 snprintf(name, sizeof(name), "pmubl");
163
164 bd = backlight_device_register(name, NULL, NULL, &pmu_backlight_data);
165 if (IS_ERR(bd)) {
166 printk(KERN_ERR "PMU Backlight registration failed\n");
167 return;

--- 24 unchanged lines hidden ---