From patchwork Fri Nov 30 11:57:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 152536 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3566194ljp; Fri, 30 Nov 2018 03:57:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/UUkYrCN/Ro4+6QjfzUaIYOazp+SIwFuzFyHjxVIJg9yMoKJszF36aMBE870RsKdInMcJ8t X-Received: by 2002:a63:64c:: with SMTP id 73mr4559569pgg.373.1543579073313; Fri, 30 Nov 2018 03:57:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543579073; cv=none; d=google.com; s=arc-20160816; b=Y2c0Q16/EP1BBMd2IZgWcLoGdZWpIQs32kqDYkKs2vOw4K+Fj2dqELGNFkS1CM1GkX 2eYacmskygpkG+BbSwvYQIt26UZWCsuZUQZOz6ptN+76QPT7y78dd6GKtsDPOR4A2Mdx tDpl4b8Lve775SjABAdkBQRLZUG8MW4kKCfhDDe3/iYtfXdkqrsl07mnTGmWkCkurYwH la4hiZYzTxnVXjCbj4ifGWN+/iSFUK6GU1HAn1nnvjV87QhZDu9Y1YWzCqigmrWkhYyy 9HZiAPrEuzXHCNhIH23/Uy9gNgEc14nZ53c64B3BXBL82JTOUKjHjOwZBX9u6Uln3HDz HUyg== 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 :dkim-signature; bh=PewPBIfHqgDIhsBbmdKcbv8XqYd2zo9JJpyybokY34A=; b=zwf0yPSEY/kSPhf6zalzQPxl5MJKchfyd+pvj6LKczu1TwPRvv9VVZm3nxPAmhIxpn W7DNWOZC8x+guBFP0VCW4lXaD1aelvG4yLJZw6eKbJUoS4VP/x4VTtkVlQ5tX75EUI/s twGXbyjr5tkddUt+D5DX+djfl1I7mohvjqrIEMdP854uiqw+b9BVrcl8Tchf8inwtxZ7 GRu0zIxyCrmkANP050pihrGq5KFBNpUeD1x9TTshOB/9aT5fN92hUI5eTk4OqKlavRgi BTZT0IwcGI3wu6LJAghb0mKe6dJYshu93KNj0bhBoApXCDEqQBrY+EsEHtGwb274SlMB /Zpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gdnKfvyg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8si4723148plk.28.2018.11.30.03.57.53; Fri, 30 Nov 2018 03:57:53 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=gdnKfvyg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726944AbeK3XGx (ORCPT + 32 others); Fri, 30 Nov 2018 18:06:53 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35946 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbeK3XGw (ORCPT ); Fri, 30 Nov 2018 18:06:52 -0500 Received: by mail-wr1-f68.google.com with SMTP id u3so5024502wrs.3 for ; Fri, 30 Nov 2018 03:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PewPBIfHqgDIhsBbmdKcbv8XqYd2zo9JJpyybokY34A=; b=gdnKfvygXVffpqjavb78W/XobM+3rZRXkGDOc7KKNczonTROzNw7uSEKh/HpLFCEWC pFXCXbIaFBR4201Arr1aE+Z9KMvQiRccYvqqqcOrFifpMBfOpvDqQQK3RW33EzM58Iov lWM77s922qoGLJ7nzqrkvE1ZJmtng9QEvMdwc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PewPBIfHqgDIhsBbmdKcbv8XqYd2zo9JJpyybokY34A=; b=fJXUoBvHyTIhPcZp2PyQ7WnW3TbbZqvvzEV2qc5W8Q1PYKw1Q2GCwmf8oPyd7EUl8X 6hpEHtWvCVkxo7t9SazMFo7QNmlJZNUCYuz/LI8O2wmamH8fJRn6K95B64NjMMUZyAmi EQCAg57f3gGbyCLTj6jNXaEKx/ybeskouXjuVNtUyXm+fHFsTv+ABTBQEbdHCXydWLyk dTkNlXPSLOA1uA/0rlf1ibm4MtElfm5Q76ILaJzYagYap4xHWiwQaRdwoPOxj2OmNKVz ne5UlulJqOWr9vDtM2HSUgcx3NlLAJNiABnay4MCUegeepTr8JV0/6iaGVddo4+4KXkZ +Iug== X-Gm-Message-State: AA+aEWbuWlLgFcmSbWPguuoSUz0DNtJw/aFUKQ3gHy9J4oKlMUG2I2li y7X2OqIxB6eG1zEH9TSAEeULGuQUSEQ= X-Received: by 2002:adf:b783:: with SMTP id s3mr4881802wre.274.1543579068201; Fri, 30 Nov 2018 03:57:48 -0800 (PST) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id c12sm3861303wrs.82.2018.11.30.03.57.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Nov 2018 03:57:47 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Wolfram Sang , Srinivas Kandagatla Subject: [PATCH 1/2] slimbus: qcom-ctrl: simplify getting .driver_data Date: Fri, 30 Nov 2018 11:57:41 +0000 Message-Id: <20181130115742.16813-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181130115742.16813-1-srinivas.kandagatla@linaro.org> References: <20181130115742.16813-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wolfram Sang We should get 'driver_data' from 'struct device' directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ctrl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.19.2 diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index db1f5135846a..ad3e2e23f56e 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -654,8 +654,7 @@ static int qcom_slim_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int qcom_slim_runtime_suspend(struct device *device) { - struct platform_device *pdev = to_platform_device(device); - struct qcom_slim_ctrl *ctrl = platform_get_drvdata(pdev); + struct qcom_slim_ctrl *ctrl = dev_get_drvdata(device); int ret; dev_dbg(device, "pm_runtime: suspending...\n"); @@ -672,8 +671,7 @@ static int qcom_slim_runtime_suspend(struct device *device) static int qcom_slim_runtime_resume(struct device *device) { - struct platform_device *pdev = to_platform_device(device); - struct qcom_slim_ctrl *ctrl = platform_get_drvdata(pdev); + struct qcom_slim_ctrl *ctrl = dev_get_drvdata(device); int ret = 0; dev_dbg(device, "pm_runtime: resuming...\n");