Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1072882ybl; Fri, 6 Dec 2019 10:48:41 -0800 (PST) X-Google-Smtp-Source: APXvYqyG7nVcClVBJa7QObgufapDVdXEnlQJLniJl06fm69fCszD48lWIrHj5I/k1hyELfb7eQdf X-Received: by 2002:a9d:6c06:: with SMTP id f6mr11871177otq.318.1575658121616; Fri, 06 Dec 2019 10:48:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575658121; cv=none; d=google.com; s=arc-20160816; b=zqiHGqdac6p3gZjb3h8JE7soPpofzKxriR6wGdauJkD/P0fgdeFw2qWEriixMEIWo+ PcwitcAJ1w3urUE+1auvjLpf60ImuD4yyALx7Gz7PxmUvr8Mug+DrFbKz0gpeZHMztnc 5DGydhYM0g0h4ji0t3sQ9tqF67gRudsR8cGLK18B+hxMBKLbSNaAL8pycLz8ADHeZZ3f dC2FNyyfgCJ50iIvEooCUtf8ZcklEo1bdc0EJGoA3EfY9EjkKeBYNu4cG7aBUQEMwWuZ WyvVCUYhNTeAbD6NnbyUFOTDoLYaI47afjfeQUTv7EX+f8XJyOffZZRDuR4NS24KHrfm Ln/Q== 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=9o4ISVa2P6pOeqYh0Ll8+Jro095934ZjUwAjarWJmTU=; b=kUXSdCkK8vJ6i7sLhd5XpK5BBo9wTvfGjdX5pzQz7J6Plaro94hvbRXVWxpnDGXeT4 o0hed/mTEMhXyVV7ylgdeggHkzAEHYtoJMLUPYqeMIEABoi9UY1zJgtGzWbsC4RA4iWL bv+0t/TLQj6M5j65zJSSYWoChFX1tgP0qX39Vrtu2HEZYK27tL2Sk9FYBvlyEGyT2U75 5nBAeWbSCOYK46f6SDm6qWruu700i7NunfeM3vwOjsML8s5lklJnVhVyn4QdMTHWVauy UZUdbAT37wQWkt7J1Ik3IeNPR/l9ddC8HZK68WFAVm6np1pnX2F3ogIbI3TL2AjZEj6e GuCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="tL/oX+/6"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a128si6676578oib.142.2019.12.06.10.48.28; Fri, 06 Dec 2019 10:48:41 -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=@gmail.com header.s=20161025 header.b="tL/oX+/6"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726551AbfLFSqi (ORCPT + 99 others); Fri, 6 Dec 2019 13:46:38 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36160 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbfLFSqg (ORCPT ); Fri, 6 Dec 2019 13:46:36 -0500 Received: by mail-pf1-f193.google.com with SMTP id x184so2330689pfb.3; Fri, 06 Dec 2019 10:46:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9o4ISVa2P6pOeqYh0Ll8+Jro095934ZjUwAjarWJmTU=; b=tL/oX+/6yHqXUXzX9ilD1PgPWLPOMzVBR1dBoaFG2pmRikiMDiyU+BORtPIIQ6mf8D OQc3zUnXJcQzagrDQaMl3ClK5KSxERD9s+mXw9QC9+2Wg28S3XYQlnQB4ljlWWNdVrON 6shAspe+xql4Eg8kvEPE+mOHEiiUzLowdIwR1KAvBfQAE+p+aVwFBvEKjlH13drSkXlc wo7NXXihiKBxGIbakXeBTuTAPrj/st4djtnmIRwKYyZ+q6pZl7144sHhRa2QGqLHjAm9 phfcrSs4dftiLzBrHwImqxI2shC3/QYSJ6L4vyH6YLhXaeSsvYI8N/O6ATkUhmiDWx78 CnzA== 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=9o4ISVa2P6pOeqYh0Ll8+Jro095934ZjUwAjarWJmTU=; b=rIGrtftlhmN2PNDe+HzjvRNewd4YIMUmDAtBnE8/qic++oXYa19PWqGhaT8slEOtFm mPJQtx7vfT0iTLUmlFYsE9EMmOjoXFM7wtlsBFI6QRg/8OCw+Awhh1l2LIeBli5V0iiZ bBmTsnw/AyK+vmm0C87clRhW2VItYL82Bh06HYyauaj5yv3OQ22b28K6yODawEv2QVeb mq96W+nSKhjjuDPfuowo9VDd1pkj/DL2ywGTkQH+sf6jfxQ7mfojR7IB3aGdfA+s6k4/ B2kH7lE4Hnvl2lBQBJVehO5sEoyvtvPeOCV5vGFRBZNtaEMxKN2JWRk6Xix8zIzL7zpp lY3w== X-Gm-Message-State: APjAAAXmWu1ROVHHygT/1w2x1duzk7oAhCvbMIufS6SSZj15Ieyb5S9I ZMogFKizFezRNF+oly1xhxE= X-Received: by 2002:a63:4f5c:: with SMTP id p28mr4984722pgl.409.1575657995416; Fri, 06 Dec 2019 10:46:35 -0800 (PST) Received: from localhost.localdomain ([103.51.73.190]) by smtp.gmail.com with ESMTPSA id p4sm16777039pfb.157.2019.12.06.10.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 10:46:35 -0800 (PST) From: Anand Moon To: Rob Herring , Mark Rutland , Heiko Stuebner , Jagan Teki , Manivannan Sadhasivam , Robin Murphy , Daniel Schultz Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFCv1 5/8] mfd: rk808: cleanup unused function pointer Date: Fri, 6 Dec 2019 18:45:33 +0000 Message-Id: <20191206184536.2507-6-linux.amoon@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191206184536.2507-1-linux.amoon@gmail.com> References: <20191206184536.2507-1-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cleanup unused pm_poweroff_fn and pm_pwroff_prep_fn function, drop the unused rockchip,system-power-controller dts binding. Cc: Heiko Stuebner Signed-off-by: Anand Moon --- drivers/mfd/rk808.c | 28 ++-------------------------- include/linux/mfd/rk808.h | 2 -- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c index 4b3b90dad4f8..9a7be379946a 100644 --- a/drivers/mfd/rk808.c +++ b/drivers/mfd/rk808.c @@ -521,7 +521,7 @@ static int rk808_probe(struct i2c_client *client, const struct mfd_cell *cells; int nr_pre_init_regs; int nr_cells; - int pm_off = 0, msb, lsb; + int msb, lsb; unsigned char pmic_id_msb, pmic_id_lsb; int ret; int i; @@ -641,18 +641,8 @@ static int rk808_probe(struct i2c_client *client, goto err_irq; } - pm_off = of_property_read_bool(np, - "rockchip,system-power-controller"); - if (pm_off && !pm_power_off) { + if (!rk808_i2c_client) rk808_i2c_client = client; - pm_power_off = rk808->pm_pwroff_fn; - } - - if (pm_off && !pm_power_off_prepare) { - if (!rk808_i2c_client) - rk808_i2c_client = client; - pm_power_off_prepare = rk808->pm_pwroff_prep_fn; - } return 0; @@ -667,20 +657,6 @@ static int rk808_remove(struct i2c_client *client) regmap_del_irq_chip(client->irq, rk808->irq_data); - /** - * pm_power_off may points to a function from another module. - * Check if the pointer is set by us and only then overwrite it. - */ - if (rk808->pm_pwroff_fn && pm_power_off == rk808->pm_pwroff_fn) - pm_power_off = NULL; - - /** - * As above, check if the pointer is set by us before overwrite. - */ - if (rk808->pm_pwroff_prep_fn && - pm_power_off_prepare == rk808->pm_pwroff_prep_fn) - pm_power_off_prepare = NULL; - return 0; } diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h index a59bf323f713..e07f6e61cd38 100644 --- a/include/linux/mfd/rk808.h +++ b/include/linux/mfd/rk808.h @@ -620,7 +620,5 @@ struct rk808 { long variant; const struct regmap_config *regmap_cfg; const struct regmap_irq_chip *regmap_irq_chip; - void (*pm_pwroff_fn)(void); - void (*pm_pwroff_prep_fn)(void); }; #endif /* __LINUX_REGULATOR_RK808_H */ -- 2.24.0