Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2571978pxb; Tue, 24 Aug 2021 02:16:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPmQ6ItpPBN80CcmntaI2JS2NAkYbPayarMzCWXkU16yyXJ9BMZye2nActjzRhZvOSlZHQ X-Received: by 2002:a17:906:bb03:: with SMTP id jz3mr41403520ejb.79.1629796598105; Tue, 24 Aug 2021 02:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629796598; cv=none; d=google.com; s=arc-20160816; b=FJP0Tley90YigBhsAqfUBm11OKoA8H5nhxhDzmRVFifWfI9AWTvP063kGyd2NmqsRh ksMsw6MXXp4YxMk/3S5T3hilyHxtQjz6280MOR4k3VWaSAMpXD9WeBYcclvxGL/6P5jc k8CG6EsPRhuCDuiLirhB68b5M8roXl3SIQ3IfJ74wMTIhS5uCzVVp9+y1OOTkr18t07q DWdaE3KtowDPggRi4BlXDwXu3yP92/nc86HheviJ6sH/S//b/plblsxffXPIKMw+GU5x zQ6y1knZYt8KRwxLMZQRrAYwqpQ/1CokGIrgdgPQVXxA9w9sai+p7GSyWp+IN8uKMH44 2l8g== 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=LXQcTfP3S+PIlwzHr32dvbtco/nsLaKzT0eCzfk6eMU=; b=EMvCrQTfxIGG5KA5IeX9TntOrO8imexp5loOd5tL3f+fQBQfHsl16GuYY1lxJ0IzDu Gipr//3Xp0QRtiNPdLoxdMRy6PBEkixSjWK3hXafSVfysOhxRa0jY5hLcEQzngKzo2jt 3G3OH1t183LGO2M/yQK58/pdt9OVaKO5zacyc8PFeb205tB1WrLiW1VB84OrV+Je9Tre zEddu1oZGsyMkljuRxgB+lC5NZJO9p3YG75veE/VYhU71vwy1eVbI1zarBtmvwssNFcI Vp4n4DTFAdE87vGPo/g++wDNcc1DbZ/Z0SDSo/R0gVpo5O0V7ljBAajhUTrjjjWJ8KDA hwtg== 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 w13si11167798edx.466.2021.08.24.02.16.15; Tue, 24 Aug 2021 02:16:38 -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 S235785AbhHXJO5 (ORCPT + 99 others); Tue, 24 Aug 2021 05:14:57 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:8900 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235666AbhHXJOt (ORCPT ); Tue, 24 Aug 2021 05:14:49 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 17O8rEkf098382; Tue, 24 Aug 2021 16:53:15 +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, 24 Aug 2021 17:11:47 +0800 From: Billy Tsai To: , , , , , , , , , , , , , CC: Subject: [RESEND v4 03/15] iio: adc: aspeed: set driver data when adc probe. Date: Tue, 24 Aug 2021 17:12:31 +0800 Message-ID: <20210824091243.9393-4-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210824091243.9393-1-billy_tsai@aspeedtech.com> References: <20210824091243.9393-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 17O8rEkf098382 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the issue when adc remove will get the null driver data. 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 7010d56ac3b9..20462cf659e4 100644 --- a/drivers/iio/adc/aspeed_adc.c +++ b/drivers/iio/adc/aspeed_adc.c @@ -201,6 +201,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