Skip to content

Commit f30dcb7

Browse files
Alex Elderdavem330
authored andcommitted
net: ipa: kill ipa_endpoint_stop()
The previous commit made ipa_endpoint_stop() be a trivial wrapper around gsi_channel_stop(). Since it no longer does anything special, just open-code it in the three places it's used. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9928fcc commit f30dcb7

2 files changed

Lines changed: 6 additions & 23 deletions

File tree

‎drivers/net/ipa/ipa_endpoint.c‎

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ static int ipa_endpoint_reset_rx_aggr(struct ipa_endpoint *endpoint)
12141214

12151215
gsi_trans_read_byte_done(gsi, endpoint->channel_id);
12161216

1217-
ret = ipa_endpoint_stop(endpoint);
1217+
ret = gsi_channel_stop(gsi, endpoint->channel_id);
12181218
if (ret)
12191219
goto out_suspend_again;
12201220

@@ -1231,7 +1231,7 @@ static int ipa_endpoint_reset_rx_aggr(struct ipa_endpoint *endpoint)
12311231
goto out_suspend_again;
12321232

12331233
err_endpoint_stop:
1234-
ipa_endpoint_stop(endpoint);
1234+
(void)gsi_channel_stop(gsi, endpoint->channel_id);
12351235
out_suspend_again:
12361236
if (suspended)
12371237
(void)ipa_endpoint_program_suspend(endpoint, true);
@@ -1269,22 +1269,6 @@ static void ipa_endpoint_reset(struct ipa_endpoint *endpoint)
12691269
ret, endpoint->channel_id, endpoint->endpoint_id);
12701270
}
12711271

1272-
/**
1273-
* ipa_endpoint_stop() - Stops a GSI channel in IPA
1274-
* @client: Client whose endpoint should be stopped
1275-
*
1276-
* This function implements the sequence to stop a GSI channel
1277-
* in IPA. This function returns when the channel is is STOP state.
1278-
*
1279-
* Return value: 0 on success, negative otherwise
1280-
*/
1281-
int ipa_endpoint_stop(struct ipa_endpoint *endpoint)
1282-
{
1283-
struct gsi *gsi = &endpoint->ipa->gsi;
1284-
1285-
return gsi_channel_stop(gsi, endpoint->channel_id);
1286-
}
1287-
12881272
static void ipa_endpoint_program(struct ipa_endpoint *endpoint)
12891273
{
12901274
if (endpoint->toward_ipa) {
@@ -1337,12 +1321,13 @@ void ipa_endpoint_disable_one(struct ipa_endpoint *endpoint)
13371321
{
13381322
u32 mask = BIT(endpoint->endpoint_id);
13391323
struct ipa *ipa = endpoint->ipa;
1324+
struct gsi *gsi = &ipa->gsi;
13401325
int ret;
13411326

1342-
if (!(endpoint->ipa->enabled & mask))
1327+
if (!(ipa->enabled & mask))
13431328
return;
13441329

1345-
endpoint->ipa->enabled ^= mask;
1330+
ipa->enabled ^= mask;
13461331

13471332
if (!endpoint->toward_ipa) {
13481333
ipa_endpoint_replenish_disable(endpoint);
@@ -1351,7 +1336,7 @@ void ipa_endpoint_disable_one(struct ipa_endpoint *endpoint)
13511336
}
13521337

13531338
/* Note that if stop fails, the channel's state is not well-defined */
1354-
ret = ipa_endpoint_stop(endpoint);
1339+
ret = gsi_channel_stop(gsi, endpoint->channel_id);
13551340
if (ret)
13561341
dev_err(&ipa->pdev->dev,
13571342
"error %d attempting to stop endpoint %u\n", ret,

‎drivers/net/ipa/ipa_endpoint.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ int ipa_endpoint_modem_exception_reset_all(struct ipa *ipa);
7676

7777
int ipa_endpoint_skb_tx(struct ipa_endpoint *endpoint, struct sk_buff *skb);
7878

79-
int ipa_endpoint_stop(struct ipa_endpoint *endpoint);
80-
8179
void ipa_endpoint_exit_one(struct ipa_endpoint *endpoint);
8280

8381
int ipa_endpoint_enable_one(struct ipa_endpoint *endpoint);

0 commit comments

Comments
 (0)