dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

11 Commits

Author SHA1 Message Date
Julia Lawall 1f7aac6eb5 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>
2010-09-02 14:07:33 +10:00
Olaf Hering db3f520738 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>
2009-09-07 14:37:27 +01:00
Johannes Berg f596575e81 [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>
2007-05-08 11:54:19 +10:00
Stephen Rothwell 01b2726dd1 [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>
2007-04-27 15:51:56 +10:00
Paul Mackerras a48141db68 Revert "[POWERPC] Rename get_property to of_get_property: drivers"
This reverts commit d05c7a80cf,
which included changes which should go via other subsystem
maintainers.
2007-04-26 22:24:31 +10:00
Stephen Rothwell d05c7a80cf [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>
2007-04-13 03:55:19 +10:00
Tony Vroon e51b85dcf5 [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>
2007-04-13 03:55:14 +10:00
Johannes Berg 70b52b3869 [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>
2007-03-26 12:35:17 +10:00
Jeremy Kerr 018a3d1db7 [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>
2006-07-31 15:55:05 +10:00
Johannes Berg 3a09aa4730 [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>
2006-07-07 20:19:15 +10:00
Johannes Berg 70c3967d4f [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>
2006-06-28 11:51:12 +10:00