From: Marc Kleine-Budde <mkl@pengutronix.de>
To: linux-can@vger.kernel.org
Cc: kernel@pengutronix.de, Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH 1/3] can: ti_hecc: remove priv->can.do_get_state() callback
Date: Mon, 7 Oct 2013 16:46:06 +0200 [thread overview]
Message-ID: <1381157168-24588-2-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1381157168-24588-1-git-send-email-mkl@pengutronix.de>
This is a preparation patch to remove the priv->can.do_get_state() callback
completely.
This patch removes the priv->can.do_get_state() callback, as just returns
priv->can.state. The only user can_fill_info() already has direct access to
priv->can.state.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/ti_hecc.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index beb5ef8..60d95b4 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -286,15 +286,6 @@ static inline u32 hecc_get_bit(struct ti_hecc_priv *priv, int reg, u32 bit_mask)
return (hecc_read(priv, reg) & bit_mask) ? 1 : 0;
}
-static int ti_hecc_get_state(const struct net_device *ndev,
- enum can_state *state)
-{
- struct ti_hecc_priv *priv = netdev_priv(ndev);
-
- *state = priv->can.state;
- return 0;
-}
-
static int ti_hecc_set_btc(struct ti_hecc_priv *priv)
{
struct can_bittiming *bit_timing = &priv->can.bittiming;
@@ -940,7 +931,6 @@ static int ti_hecc_probe(struct platform_device *pdev)
priv->can.bittiming_const = &ti_hecc_bittiming_const;
priv->can.do_set_mode = ti_hecc_do_set_mode;
- priv->can.do_get_state = ti_hecc_get_state;
priv->can.do_get_berr_counter = ti_hecc_get_berr_counter;
priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES;
--
1.8.4.rc3
next prev parent reply other threads:[~2013-10-07 14:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 14:46 [PATCH 0/3] remove do_get_state() callback Marc Kleine-Budde
2013-10-07 14:46 ` Marc Kleine-Budde [this message]
2013-10-07 14:46 ` [PATCH 2/3] can: dev: remove do_get_state() form can_fill_info() Marc Kleine-Budde
2013-10-07 14:46 ` [PATCH 3/3] can: dev: remove do_get_state() callback from struct can_priv Marc Kleine-Budde
2013-10-07 19:25 ` [PATCH 0/3] remove do_get_state() callback Wolfgang Grandegger
2013-10-07 19:39 ` Marc Kleine-Budde
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=1381157168-24588-2-git-send-email-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
/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).