[RFC PATCH 02/13] misc: atmel_ssc: keep the count of pdev->id

From
Richard Genoud <hidden>
Date
2013-07-05 15:16:25
Also in
linux-devicetree, lkml
Reply to
Bo Shen, 2013-07-02
2013/7/2 Bo Shen [off-list ref]:
Hi Richard,


On 7/1/2013 16:39, Richard Genoud wrote:
quoted
With device tree, pdev->id is always -1, so we introduce a local
counter.

Signed-off-by: Richard Genoud <redacted>
---
  drivers/misc/atmel-ssc.c |    7 +++++++
  1 file changed, 7 insertions(+)
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 3afbd82..d1ec5ab 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -173,6 +173,12 @@ out:
        return err;
  }

+/* counter of ssc devive instances.
+ * With device tree pdev->id is always -1, so we have to keep the
+ * count ourselves
+ */
+static int ssc_device_id;

Do we really need this? If Yes, would it better to get from device through
of_alias_get_id?
you're right, it seems that we don't need that anymore.

thanks !

Richard.
Thread (33 messages) 33 messages, 3 authors, last reply 2013-07-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help