static int aux_pcm_probe(struct platform_device *pdev) { int rc = 0; struct resource *mem_src; MM_DBG("aux_pcm_probe \n"); mem_src = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aux_codec_reg_addr"); if (!mem_src) { rc = -ENODEV; goto done; } the_aux_pcm_state.aux_pcm_base = ioremap(mem_src->start, (mem_src->end - mem_src->start) + 1); if (!the_aux_pcm_state.aux_pcm_base) { rc = -ENOMEM; goto done; } rc = get_aux_pcm_gpios(pdev); if (rc) { MM_ERR("GPIO configuration failed\n"); rc = -ENODEV; } done: return rc; }
static int aux_pcm_probe(struct platform_device *pdev) { int rc = 0; rc = get_aux_pcm_gpios(pdev); if (rc < 0) { pr_err("%s: GPIO configuration failed\n", __func__); return -ENODEV; } return rc; }