1 /// Remove .owner field if calls are used which set it automatically
4 // Copyright: (C) 2014 Wolfram Sang. GPL v2.
12 declarer name module_i2c_driver;
13 declarer name module_platform_driver;
14 declarer name module_platform_driver_probe;
18 module_i2c_driver(__driver);
20 module_platform_driver(__driver);
22 module_platform_driver_probe(__driver, ...);
25 @fix1 depends on match1 && patch && !context && !org && !report@
26 identifier match1.__driver;
28 static struct platform_driver __driver = {
30 - .owner = THIS_MODULE,
34 @fix1_i2c depends on match1 && patch && !context && !org && !report@
35 identifier match1.__driver;
37 static struct i2c_driver __driver = {
39 - .owner = THIS_MODULE,
47 platform_driver_register(&__driver)
49 platform_driver_probe(&__driver, ...)
51 platform_create_bundle(&__driver, ...)
53 i2c_add_driver(&__driver)
56 @fix2 depends on match2 && patch && !context && !org && !report@
57 identifier match2.__driver;
59 static struct platform_driver __driver = {
61 - .owner = THIS_MODULE,
65 @fix2_i2c depends on match2 && patch && !context && !org && !report@
66 identifier match2.__driver;
68 static struct i2c_driver __driver = {
70 - .owner = THIS_MODULE,
74 // ----------------------------------------------------------------------------
76 @fix1_context depends on match1 && !patch && (context || org || report)@
77 identifier match1.__driver;
81 static struct platform_driver __driver = {
83 * .owner@j0 = THIS_MODULE,
87 @fix1_i2c_context depends on match1 && !patch && (context || org || report)@
88 identifier match1.__driver;
92 static struct i2c_driver __driver = {
94 * .owner@j0 = THIS_MODULE,
98 @fix2_context depends on match2 && !patch && (context || org || report)@
99 identifier match2.__driver;
103 static struct platform_driver __driver = {
105 * .owner@j0 = THIS_MODULE,
109 @fix2_i2c_context depends on match2 && !patch && (context || org || report)@
110 identifier match2.__driver;
114 static struct i2c_driver __driver = {
116 * .owner@j0 = THIS_MODULE,
120 // ----------------------------------------------------------------------------
122 @script:python fix1_org depends on org@
123 j0 << fix1_context.j0;
126 msg = "No need to set .owner here. The core will do it."
127 coccilib.org.print_todo(j0[0], msg)
129 @script:python fix1_i2c_org depends on org@
130 j0 << fix1_i2c_context.j0;
133 msg = "No need to set .owner here. The core will do it."
134 coccilib.org.print_todo(j0[0], msg)
136 @script:python fix2_org depends on org@
137 j0 << fix2_context.j0;
140 msg = "No need to set .owner here. The core will do it."
141 coccilib.org.print_todo(j0[0], msg)
143 @script:python fix2_i2c_org depends on org@
144 j0 << fix2_i2c_context.j0;
147 msg = "No need to set .owner here. The core will do it."
148 coccilib.org.print_todo(j0[0], msg)
150 // ----------------------------------------------------------------------------
152 @script:python fix1_report depends on report@
153 j0 << fix1_context.j0;
156 msg = "No need to set .owner here. The core will do it."
157 coccilib.report.print_report(j0[0], msg)
159 @script:python fix1_i2c_report depends on report@
160 j0 << fix1_i2c_context.j0;
163 msg = "No need to set .owner here. The core will do it."
164 coccilib.report.print_report(j0[0], msg)
166 @script:python fix2_report depends on report@
167 j0 << fix2_context.j0;
170 msg = "No need to set .owner here. The core will do it."
171 coccilib.report.print_report(j0[0], msg)
173 @script:python fix2_i2c_report depends on report@
174 j0 << fix2_i2c_context.j0;
177 msg = "No need to set .owner here. The core will do it."
178 coccilib.report.print_report(j0[0], msg)