Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3285332yba; Tue, 23 Apr 2019 00:41:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6smQGOMNeNobcK6s80s4fxgX8e4LMV2b31o9trV++kUEHKDAkDPZw5/BPcnWx993oLE41 X-Received: by 2002:aa7:8589:: with SMTP id w9mr25254668pfn.97.1556005309660; Tue, 23 Apr 2019 00:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556005309; cv=none; d=google.com; s=arc-20160816; b=TLJd5qfVujr3F7/gqfLRoUjNtSzQfvchVlFlKbjSdu+xlU/wMCGXF8NEcPY17aCDIn 4ZjQgYNYlVTt+jKkr13pi8585Hpi1evzt8UEHxWgfV0oMvJ5oMrAAGMgdBci5ztiF+TC zEinAmf44saoIs1CyvGxJHazAfrC1IhaJ0lEi95yXBH1Guac8/5LdxfNOpX/0WyPoTG0 diNc0wTsgWe5wxrDzwQG65jHKbDvO5Yf3Td/PBaOd8O7/2Tb6FWu6kHtnA8Ua7FnjqsE NAXyu9kRfVXRj5tcQrm8fF7NA94pF56/BaitY5N4RbUsn7NlirqIKonBT5JcfgPREyzO ZIzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OlVuuKbaR2YLy3bk9BoLYFHzet5f1sVsXHg1ylcXvn8=; b=e5KUpResNCwOzXQaS8V/rhjGfAeV2y1lBeECxQ8NS+ZSx8ZbDE6YxN3v0OVbyVtBZE hQN58dJZV5q17nxZc5jJv4hZH7oCA5zeUGpynnL7DUUEpu/zkcO9F5H0CxH4riEUNdxz 38rQqaDkw1tq48ouSgNS2jEsk4vfXF4WRl04lyDYnE+SXBs9WVRe/7lutpIVUddfAGA6 7WCSF50nowQGamUwMwoOwRea/cteSAcj63nMfGxiH32RmEdhAT+CFrB73HCOICITZXOQ A39IfVl7XMQavsHlrz7om5H6Ufk/rOpnPOdgdJ2LNPafJkBe7tU0DUI/lol/miFxAn7C EIBA== 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 q17si14685795pgq.216.2019.04.23.00.41.34; Tue, 23 Apr 2019 00:41:49 -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 S1726810AbfDWHk2 (ORCPT + 99 others); Tue, 23 Apr 2019 03:40:28 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7231 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726734AbfDWHk0 (ORCPT ); Tue, 23 Apr 2019 03:40:26 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7325D79746133204AEBB; Tue, 23 Apr 2019 15:40:22 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 15:40:12 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , Wolfgang Grandegger , "Marc Kleine-Budde" , "David S. Miller" , Subject: [PATCH next 18/25] net: can: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:50:13 +0800 Message-ID: <20190423075020.173734-19-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423075020.173734-1-wangkefeng.wang@huawei.com> References: <20190423075020.173734-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using dev_get_drvdata directly. Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/net/can/softing/softing_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index e22696190583..6de68036ed41 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c @@ -694,7 +694,7 @@ static void softing_netdev_cleanup(struct net_device *netdev) static ssize_t show_##name(struct device *dev, \ struct device_attribute *attr, char *buf) \ { \ - struct softing *card = platform_get_drvdata(to_platform_device(dev)); \ + struct softing *card = dev_get_drvdata(dev); \ return sprintf(buf, "%u\n", card->member); \ } \ static DEVICE_ATTR(name, 0444, show_##name, NULL) @@ -703,7 +703,7 @@ static DEVICE_ATTR(name, 0444, show_##name, NULL) static ssize_t show_##name(struct device *dev, \ struct device_attribute *attr, char *buf) \ { \ - struct softing *card = platform_get_drvdata(to_platform_device(dev)); \ + struct softing *card = dev_get_drvdata(dev); \ return sprintf(buf, "%s\n", card->member); \ } \ static DEVICE_ATTR(name, 0444, show_##name, NULL) -- 2.20.1