Merge branches 'acpi-processor' and 'acpi-cppc'
[deliverable/linux.git] / drivers / mailbox / pcc.c
index ac11a9b395d301326fe09a911f404b7b6c0a718f..0ddf638d60f3645c4a083b37027625dfd850b97f 100644 (file)
@@ -85,16 +85,10 @@ static struct mbox_controller pcc_mbox_ctrl = {};
  */
 static struct mbox_chan *get_pcc_channel(int id)
 {
-       struct mbox_chan *pcc_chan;
-
        if (id < 0 || id > pcc_mbox_ctrl.num_chans)
                return ERR_PTR(-ENOENT);
 
-       pcc_chan = (struct mbox_chan *)
-               (unsigned long) pcc_mbox_channels +
-               (id * sizeof(*pcc_chan));
-
-       return pcc_chan;
+       return &pcc_mbox_channels[id];
 }
 
 /**
This page took 0.024761 seconds and 5 git commands to generate.