From: "Paweł Chmiel" <pawel.mikolaj.chmiel@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: robh+dt@kernel.org, mark.rutland@arm.com,
pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca,
devicetree@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/5] input: misc: bma150: Drop platform data
Date: Sat, 2 Feb 2019 16:18:05 +0100 [thread overview]
Message-ID: <20190202151806.9064-5-pawel.mikolaj.chmiel@gmail.com> (raw)
In-Reply-To: <20190202151806.9064-1-pawel.mikolaj.chmiel@gmail.com>
From: Jonathan Bakker <xc-racer2@live.ca>
bma150 supports DT now and as there are no in-kernel users of
the platform data, remove it.
Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
drivers/input/misc/bma150.c | 27 +++++----------------------
include/linux/bma150.h | 5 -----
2 files changed, 5 insertions(+), 27 deletions(-)
diff --git a/drivers/input/misc/bma150.c b/drivers/input/misc/bma150.c
index e86df79490ad..1cdc8ce97968 100644
--- a/drivers/input/misc/bma150.c
+++ b/drivers/input/misc/bma150.c
@@ -567,8 +567,6 @@ int bma150_cfg_from_of(struct device_node *np)
static int bma150_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- const struct bma150_platform_data *pdata =
- dev_get_platdata(&client->dev);
const struct bma150_cfg *cfg;
struct bma150_data *bma150;
int chip_id;
@@ -592,27 +590,12 @@ static int bma150_probe(struct i2c_client *client,
bma150->client = client;
- if (pdata) {
- if (pdata->irq_gpio_cfg) {
- error = pdata->irq_gpio_cfg();
- if (error) {
- dev_err(&client->dev,
- "IRQ GPIO conf. error %d, error %d\n",
- client->irq, error);
- return error;
- }
- }
- cfg = &pdata->cfg;
- } else if (client->dev.of_node) {
- error = bma150_cfg_from_of(client->dev.of_node);
- if (error) {
- dev_err(&client->dev, "Failed to parse of data\n");
- return error;
- }
- cfg = &default_cfg;
- } else {
- cfg = &default_cfg;
+ error = bma150_cfg_from_of(client->dev.of_node);
+ if (error) {
+ dev_err(&client->dev, "Failed to parse of data\n");
+ return error;
}
+ cfg = &default_cfg;
error = bma150_initialize(bma150, cfg);
if (error)
diff --git a/include/linux/bma150.h b/include/linux/bma150.h
index ad19dc7a30d7..650ffe9fa4cf 100644
--- a/include/linux/bma150.h
+++ b/include/linux/bma150.h
@@ -41,9 +41,4 @@ struct bma150_cfg {
u32 bandwidth; /* one of BMA0150_BW_xxx */
};
-struct bma150_platform_data {
- struct bma150_cfg cfg;
- int (*irq_gpio_cfg)(void);
-};
-
#endif /* _BMA150_H_ */
--
2.17.1
next prev parent reply other threads:[~2019-02-02 15:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 15:18 [PATCH v2 0/5] input: misc: bma150: Add support for device tree Paweł Chmiel
2019-02-02 15:18 ` [PATCH v2 1/5] dt-bindings: input: Add binding for bma150 sensor Paweł Chmiel
2019-02-18 19:18 ` Rob Herring
2019-02-18 22:17 ` Jonathan Bakker
2019-02-02 15:18 ` [PATCH v2 2/5] input: misc: bma150: Use managed resources helpers Paweł Chmiel
2019-02-06 18:52 ` Dmitry Torokhov
2019-02-02 15:18 ` [PATCH v2 3/5] input: misc: bma150: Add support for device tree Paweł Chmiel
2019-02-02 15:18 ` Paweł Chmiel [this message]
2019-02-02 15:18 ` [PATCH v2 5/5] input: misc: bma150: Register input device after setting private data Paweł Chmiel
2019-02-06 18:53 ` Dmitry Torokhov
2019-02-06 19:23 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190202151806.9064-5-pawel.mikolaj.chmiel@gmail.com \
--to=pawel.mikolaj.chmiel@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=xc-racer2@live.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).