aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/cbe_thermal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/cell/cbe_thermal.c')
-rw-r--r--arch/powerpc/platforms/cell/cbe_thermal.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c
index e4132f8f51b..fb5eda48467 100644
--- a/arch/powerpc/platforms/cell/cbe_thermal.c
+++ b/arch/powerpc/platforms/cell/cbe_thermal.c
@@ -88,17 +88,13 @@ static struct cbe_pmd_regs __iomem *get_pmd_regs(struct sys_device *sysdev)
/* returns the value for a given spu in a given register */
static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg)
{
- const unsigned int *id;
union spe_reg value;
struct spu *spu;
- /* getting the id from the reg attribute will not work on future device-tree layouts
- * in future we should store the id to the spu struct and use it here */
spu = container_of(sysdev, struct spu, sysdev);
- id = of_get_property(spu_devnode(spu), "reg", NULL);
value.val = in_be64(&reg->val);
- return value.spe[*id];
+ return value.spe[spu->spe_id];
}
static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf)