History log of /drivers/macintosh/via-pmu-led.c
Revision Date Author Comments
1f7aac6eb585f92756603341cb1d770c797c4867 29-Aug-2010 Julia Lawall <julia@diku.dk> powerpc/via-pmu-led.c: Add of_node_put to avoid memory leak

Add a call to of_node_put in the error handling code following a call to
of_find_node_by_path.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression x;
expression E,E1;
statement S;
@@

*x =
(of_find_node_by_path
|of_find_node_by_name
|of_find_node_by_phandle
|of_get_parent
|of_get_next_parent
|of_get_next_child
|of_find_compatible_node
|of_match_node
)(...);
...
if (x == NULL) S
<... when != x = E
*if (...) {
... when != of_node_put(x)
when != if (...) { ... of_node_put(x); ... }
(
return <+...x...+>;
|
* return ...;
)
}
...>
of_node_put(x);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
db3f520738a8c5bf593e13d4ac71f8da9ffcb964 07-Sep-2009 Olaf Hering <olh@suse.de> leds: Fix LED names

This is needed to get kde-powersave to work properly on some g4
powerbooks.

From: Olaf Hering <olh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
f596575e81999c0faf01a2fd340bc96dda058f80 07-May-2007 Johannes Berg <johannes@sipsolutions.net> [POWERPC] via-pmu: remove LED sleep notifier

The generic LED code now makes sure that suspended devices don't blink,
so we no longer need to do it ourselves. For the suspend to disk case,
however, we need to make sure that we don't blink if the PMU sysdev
was suspended before the LED device.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
01b2726dd11ef198ac6cf8f88974b4427d40ffdb 27-Apr-2007 Stephen Rothwell <sfr@canb.auug.org.au> [POWERPC] Rename get_property to of_get_property: partial drivers

This does drivers/machintosh and the hvc code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
a48141db68e4b9143759435badcc1a49d9022db4 26-Apr-2007 Paul Mackerras <paulus@samba.org> Revert "[POWERPC] Rename get_property to of_get_property: drivers"

This reverts commit d05c7a80cf39ae7d0f8d0c3e47c93d51fcd393d3,
which included changes which should go via other subsystem
maintainers.
d05c7a80cf39ae7d0f8d0c3e47c93d51fcd393d3 03-Apr-2007 Stephen Rothwell <sfr@canb.auug.org.au> [POWERPC] Rename get_property to of_get_property: drivers

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
e51b85dcf56c87772b47a0781e6cfa88848b50b8 23-Mar-2007 Tony Vroon <chainsaw@gentoo.org> [POWERPC] PMU LED whitelisting of PowerMac 7,2 and 7,3

This allows the PMU LED on both a PowerMac 7,2 (Dual G5 2.0GHz, June 2003)
and a PowerMac 7,3 (Dual G5 2.0GHz, June 2004) to be controlled.
The physical LED is never off, unlike an iBook/PowerBook LED.
It is rather dim ("off") or very bright ("on").

Signed-off-by: Tony Vroon <chainsaw@gentoo.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
70b52b3869a31aab85241a1f998f9943a3905637 19-Mar-2007 Johannes Berg <johannes@sipsolutions.net> [POWERPC] powermac: disallow pmu sleep notifiers from aborting sleep

Tracing through the code, no current PMU sleep notifier can abort sleep.
Since no new PMU sleep notifiers should be added, this patch simplifies the
code and removes the ability to abort sleep.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
018a3d1db7cdb6127656c1622ee1d2302e16436d 12-Jul-2006 Jeremy Kerr <jk@ozlabs.org> [POWERPC] powermac: Constify & voidify get_property()

Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.

powermac platform & macintosh driver changes.

Built for pmac32_defconfig, g5_defconfig

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
d1a8df9136ff55e554e11ce65854c282965be8f5 03-Jul-2006 Johannes Berg <johannes@sipsolutions.net> [POWERPC] fix up front-LED Kconfig

This patch fixes the front-LED Kconfig issues I introduced while
creating it. Apparently having a dependency isn't enough to have the
select not evaluated or something like that.

The patch also changes the default configuration for pmac32 select the
default for the LED to be the IDE trigger. While I was at it, I
completely updated the defconfig and also added snd-aoa to it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
3a09aa4730f021ad917a66a0c6d2ff6d616a7e4f 03-Jul-2006 Johannes Berg <johannes@sipsolutions.net> [POWERPC] fix up front-LED Kconfig

Rather long patch, apparently no one has updated the pmac32_defconfig in
a while.

Signed-off-by: Paul Mackerras <paulus@samba.org>
70c3967d4f8029f3d53323a9f0490df61d8cb77d 21-Jun-2006 Johannes Berg <johannes@sipsolutions.net> [POWERPC] Convert powermac ide blink to new led infrastructure

This patch removes the old pmac ide led blink code and
adds generic LED subsystem support for the LED.

It maintains backward compatibility with the old
BLK_DEV_IDE_PMAC_BLINK Kconfig option which now
simply selects the new code and influences the
default trigger.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>