aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-05-17 14:11:19 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-17 14:11:19 -0400
commit08a6ee5807711c4dfa0726e315864a408aa6c13c (patch)
tree908cda03c0f0104845311cabe0fabd105755474f /net
parent4c1cd4fdfd14ecd417962f8c2166506132697f7c (diff)
parentf79a917e69e1f5cd86e864b67f06147f1b0340f4 (diff)
Merge tag 'net-next-qcom-soc-4.7-2-merge' of git://github.com/andersson/kernel
Merge tag 'qcom-soc-for-4.7-2' into net-next This merges the Qualcomm SOC tree with the net-next, solving the merge conflict in the SMD API between the two.
Diffstat (limited to 'net')
-rw-r--r--net/qrtr/smd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/qrtr/smd.c b/net/qrtr/smd.c
index 84ebce73aa23..0d11132b3370 100644
--- a/net/qrtr/smd.c
+++ b/net/qrtr/smd.c
@@ -21,13 +21,14 @@
21struct qrtr_smd_dev { 21struct qrtr_smd_dev {
22 struct qrtr_endpoint ep; 22 struct qrtr_endpoint ep;
23 struct qcom_smd_channel *channel; 23 struct qcom_smd_channel *channel;
24 struct device *dev;
24}; 25};
25 26
26/* from smd to qrtr */ 27/* from smd to qrtr */
27static int qcom_smd_qrtr_callback(struct qcom_smd_device *sdev, 28static int qcom_smd_qrtr_callback(struct qcom_smd_channel *channel,
28 const void *data, size_t len) 29 const void *data, size_t len)
29{ 30{
30 struct qrtr_smd_dev *qdev = dev_get_drvdata(&sdev->dev); 31 struct qrtr_smd_dev *qdev = qcom_smd_get_drvdata(channel);
31 int rc; 32 int rc;
32 33
33 if (!qdev) 34 if (!qdev)
@@ -35,7 +36,7 @@ static int qcom_smd_qrtr_callback(struct qcom_smd_device *sdev,
35 36
36 rc = qrtr_endpoint_post(&qdev->ep, data, len); 37 rc = qrtr_endpoint_post(&qdev->ep, data, len);
37 if (rc == -EINVAL) { 38 if (rc == -EINVAL) {
38 dev_err(&sdev->dev, "invalid ipcrouter packet\n"); 39 dev_err(qdev->dev, "invalid ipcrouter packet\n");
39 /* return 0 to let smd drop the packet */ 40 /* return 0 to let smd drop the packet */
40 rc = 0; 41 rc = 0;
41 } 42 }
@@ -73,12 +74,14 @@ static int qcom_smd_qrtr_probe(struct qcom_smd_device *sdev)
73 return -ENOMEM; 74 return -ENOMEM;
74 75
75 qdev->channel = sdev->channel; 76 qdev->channel = sdev->channel;
77 qdev->dev = &sdev->dev;
76 qdev->ep.xmit = qcom_smd_qrtr_send; 78 qdev->ep.xmit = qcom_smd_qrtr_send;
77 79
78 rc = qrtr_endpoint_register(&qdev->ep, QRTR_EP_NID_AUTO); 80 rc = qrtr_endpoint_register(&qdev->ep, QRTR_EP_NID_AUTO);
79 if (rc) 81 if (rc)
80 return rc; 82 return rc;
81 83
84 qcom_smd_set_drvdata(sdev->channel, qdev);
82 dev_set_drvdata(&sdev->dev, qdev); 85 dev_set_drvdata(&sdev->dev, qdev);
83 86
84 dev_dbg(&sdev->dev, "Qualcomm SMD QRTR driver probed\n"); 87 dev_dbg(&sdev->dev, "Qualcomm SMD QRTR driver probed\n");