Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1072554yba; Thu, 4 Apr 2019 03:47:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8hVA5iVCGKqUP39ABus51STlNuXtOKp5UJmnujfp2nnKLIa2p1KYUnUkRkJQ33HJpKpGM X-Received: by 2002:a63:e653:: with SMTP id p19mr5066315pgj.284.1554374820500; Thu, 04 Apr 2019 03:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554374820; cv=none; d=google.com; s=arc-20160816; b=OrJltlxtjqjJWxNbOEtF1hGqkmhatsIp4QWB4TOWgcBrQrPm1PAmp0KShqgYd+12lL B5Z78oMInEjOIOlLANRz/vvkHttBZYFtBTUo5YYLGNr4PFNrurfsyGiTAx1oOaNRV+nq 2msMlCaUsxpaz+V5sg+0JN8dbec9vMd9n7VIoGaTBMubPi+2IDWqrHbDLzRs4EnCvss2 GJPIXufhCgUqcOse8g9KOoLl6UmeLFlrYd0ZPn6DSXhvCKjnznsnPBQfWU/BXNiMgCrp veJBi4LsHSnAfd9rB90vBzhtzNXFI3m4LWt30wSI75Pu8+eJhnp6Z8loJKZMZVVXiFdM hbDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=021szwDEED6sayhS5Gn2EuHtaYzm4VXlMc+WkjTbkHE=; b=PR+aR66Gxt3SyRIlbdJgfJDKO1X/i3XgROKPX4L5hK6JS/di4M8zsMmPwvWy5Hm6mG jNqEU/xRA5/mhi4uQLdOzjzGwcxmrLJj3qfATVsmCoCrWbAtONOAWj1WIAJ0D1bz90bM QJbq8gUrQho++UDlD5qI0jJKZb9LxlL5D1qkAxf+kW2nPKDvVEzJef5iBH4vE44qX9sR xAPS1NXHr39kGRIyUlxics678mN79kitm8471HuZg/Feyn10Zuku2ni0LcR5Yax07JSy grKWM7D/GjyQILxiCAAmvRHTHfolPJUKz5eGMxGkZNXo9w86WLjiCFN3ks5wvKZZmd6b EdDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r13si16136207pgj.413.2019.04.04.03.46.44; Thu, 04 Apr 2019 03:47:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729526AbfDDKoh (ORCPT + 99 others); Thu, 4 Apr 2019 06:44:37 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5664 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729087AbfDDKoh (ORCPT ); Thu, 4 Apr 2019 06:44:37 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 546589909CD0C4C25788; Thu, 4 Apr 2019 18:44:35 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.408.0; Thu, 4 Apr 2019 18:44:25 +0800 From: Yue Haibing To: , , , CC: , YueHaibing Subject: [PATCH] extcon: axp288: Fix build err without CONFIG_ACPI Date: Thu, 4 Apr 2019 18:42:22 +0800 Message-ID: <20190404104222.23900-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing When building CONFIG_ACPI is not set gcc warn this: drivers/extcon/extcon-axp288.c: In function 'axp288_extcon_probe': drivers/extcon/extcon-axp288.c:363:20: error: dereferencing pointer to incomplete type put_device(&adev->dev); Reported-by: Hulk Robot Fixes: 0cf064db948a ("extcon: axp288: Convert to use acpi_dev_get_first_match_dev()") Signed-off-by: YueHaibing --- drivers/extcon/extcon-axp288.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c index 50f9402..ed8ac3f 100644 --- a/drivers/extcon/extcon-axp288.c +++ b/drivers/extcon/extcon-axp288.c @@ -333,7 +333,6 @@ static int axp288_extcon_probe(struct platform_device *pdev) struct axp288_extcon_info *info; struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); struct device *dev = &pdev->dev; - struct acpi_device *adev; int ret, i, pirq; info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); @@ -357,6 +356,8 @@ static int axp288_extcon_probe(struct platform_device *pdev) if (ret) return ret; +#ifdef CONFIG_ACPI + struct acpi_device *adev; adev = acpi_dev_get_first_match_dev("INT3496", NULL, -1); if (adev) { info->id_extcon = extcon_get_extcon_dev(acpi_dev_name(adev)); @@ -365,9 +366,10 @@ static int axp288_extcon_probe(struct platform_device *pdev) return -EPROBE_DEFER; dev_info(dev, "controlling USB role\n"); - } else { - dev_info(dev, "controlling USB role based on Vbus presence\n"); } +#else + dev_info(dev, "controlling USB role based on Vbus presence\n"); +#endif } info->vbus_attach = axp288_get_vbus_attach(info); -- 2.7.4