On Wednesday 27 August 2014 20:09:02 Mark Brown wrote: > On Wed, Aug 27, 2014 at 09:07:15AM -0400, Ashwin Chaugule wrote: > > On 27 August 2014 06:27, Mark Brown <broonie@xxxxxxxxxx> wrote: > > > On Tue, Aug 26, 2014 at 03:35:36PM -0400, Ashwin Chaugule wrote: > > > >> +static struct mbox_controller * > > >> +mbox_find_pcc_controller(char *name) > > >> +{ > > >> + struct mbox_controller *mbox; > > >> + list_for_each_entry(mbox, &mbox_cons, node) { > > >> + if (mbox->name) > > >> + if (!strcmp(mbox->name, name)) > > >> + return mbox; > > >> + } > > >> + > > >> + return NULL; > > >> +} > > > > This doesn't look particularly PCC specific? > > > Call this mbox_find_controller_by_name() instead? > > That certainly looks like what it's doing. Probably also make the name > that gets passed in const while you're at it. The mailbox API intentionally does not have an interface for that: you are supposed to get a reference to an mbox controller from a phandle or similar, not by knowing the name of the controller. Unfortunately, the three patches that Ashwin posted don't have a caller for this function, so I don't know what it's actually used for. Why do we need this function for pcc, and what are the names that can be passed here? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html