On Tue, Oct 19, 2010 at 6:02 AM, Cyril Chemparathy <cyril@xxxxxx> wrote: > Hi Victor, > > [...] >> Yes you are right and as I understand gpio_request will give a 0 if it >> success and because of that the warning never will appear, if there is >> a problem there will be a -1 and the warning will be printed. I could >> fix this with a return that breaks the code like this >> >> ret = gpio_request(DA850_HAWK_MMCSD_CD_PIN, "MMC CD\n"); >> if (ret) { >> pr_warning("%s: can not open GPIO %d\n", >> __func__, DA850_HAWK_MMCSD_CD_PIN); >> return; >> } >> gpio_direction_input(DA850_HAWK_MMCSD_CD_PIN); > > I think gpio_request_one() is simpler. This requests the gpio and sets > it up: > > ret = gpio_request_one(DA850_HAWK_MMCSD_CD_PIN, > GPIOF_DIR_IN, "MMC CD"); > if (ret < 0) { > ... failed ... > } > > Regards > Cyril. > Thanks works perfect Regards Victor Rodriguez _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel