X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=drivers%2Fmailbox%2Fpcc.c;fp=drivers%2Fmailbox%2Fpcc.c;h=043828d541f794b331fdaef51e2649a58a472525;hb=fa81e66ec8648f62e96e95e53db2ea95a4b57b26;hp=9d3955e6ab44f2fb99e23094e73570c11d567024;hpb=169b38373fd4a7d47cac0e5fdeeae90b8c076f32;p=cascardo%2Flinux.git diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 9d3955e6ab44..043828d541f7 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -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]; } /**