Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4260366pxb; Tue, 31 Aug 2021 00:17:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZmDxj+Zv+KkZ1U4n9sQMehNNIlDLX56+FgcyBdlCVVLE9DOQkIuwHM3sF+9hrSRIOJmmP X-Received: by 2002:a6b:905:: with SMTP id t5mr21161201ioi.209.1630394227750; Tue, 31 Aug 2021 00:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630394227; cv=none; d=google.com; s=arc-20160816; b=sGAAjkLqx/V2BLsvHyxbgvRJhuyTjv/BuppgcgPtOS82Nu/fcMXYMdJsuwPUlOTGj5 Y4khkwSxsOQvG79M4a4naaHJ3uVSWtgrHpgewULM6hd+HsOw4ch/cZMaFxA5H1aBiXVe fTeMz64Y4shqk24RT4O0OoDZ8KB89/p8wVI0Ys7ZPvVEFd5SYkuRockvD6mDFPWKNxlq wUMutC6Jgg0wBb1TOpemJpr1jzDc5gii+9g8kcZW2AEtMHfa8He9GpbZ2V3cJx7YTfPc GkGRn73BgBjOqCn6VTgnsImgDwBu6oGY7xct0NkuZEmFA+nXPForiNXBWeFKImWAkrnZ M2Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DTx2z/3RLqybROwncbZATHB9Lw31z/jqrSr1XbmSKk4=; b=UiE/YVVwvL55lWgeG3ezUL7WBlLXz9rvtWH9pqktb1cCuCpn3z6vOPjJwXuFy/87Sy BMmTJ1bhmHwbZR+Kt6oT7gfAG3ieuNkVjIh9xu7agk+xb++Ax+OVlxl8dXD8AEH1C9jd qJ0RYgx/anL7vuy72LHOGki9tH1cAGhX5bJe+2uJFuxQEyiVn8pQun66Y4xfcN2Cb4rx bRBIvXbZoysS6JH1nx2O3ZoM6VkiwQAWI5tkmtsIJQ2jhtsJ3ckC81+f6aSDiCUOEuxR kVFr4zx6LOq0lsJ4X3UtXDgwX5913t+DLCzcO2Ho6Q6DLRO4uSleakQGhIj6w8oH5xZO Rg8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x4si16282092ilj.121.2021.08.31.00.16.46; Tue, 31 Aug 2021 00:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239737AbhHaHQu (ORCPT + 99 others); Tue, 31 Aug 2021 03:16:50 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:14740 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239529AbhHaHQ1 (ORCPT ); Tue, 31 Aug 2021 03:16:27 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 17V6saUT028255; Tue, 31 Aug 2021 14:54:36 +0800 (GMT-8) (envelope-from billy_tsai@aspeedtech.com) Received: from BillyTsai-pc.aspeed.com (192.168.2.149) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 Aug 2021 15:13:34 +0800 From: Billy Tsai To: , , , , , , , , , , , , , CC: Subject: [v5 01/15] iio: adc: aspeed: set driver data when adc probe. Date: Tue, 31 Aug 2021 15:14:44 +0800 Message-ID: <20210831071458.2334-2-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210831071458.2334-1-billy_tsai@aspeedtech.com> References: <20210831071458.2334-1-billy_tsai@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.2.149] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 17V6saUT028255 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the issue when adc remove will get the null driver data. Fixed: commit 573803234e72 ("iio: Aspeed ADC") Signed-off-by: Billy Tsai --- drivers/iio/adc/aspeed_adc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iio/adc/aspeed_adc.c b/drivers/iio/adc/aspeed_adc.c index 19efaa41bc34..34ec0c28b2df 100644 --- a/drivers/iio/adc/aspeed_adc.c +++ b/drivers/iio/adc/aspeed_adc.c @@ -183,6 +183,7 @@ static int aspeed_adc_probe(struct platform_device *pdev) data = iio_priv(indio_dev); data->dev = &pdev->dev; + platform_set_drvdata(pdev, indio_dev); data->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(data->base)) -- 2.25.1