Commit a0d15cc
i2c: nomadik: switch from of_device_is_compatible() to of_match_device()
Compatible-specific behavior is implemented using a if-condition on the
return value from of_device_is_compatible(), from probe. It does not
scale well when compatible number increases. Switch to using a match
table and a call to of_match_device().
We DO NOT attach a .of_match_table field to our amba driver, as we do
not use the table to match our driver to devices.
Sort probe variable declarations in reverse christmas tree to try and
introduce some logic into the ordering.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>1 parent 5420210 commit a0d15cc
1 file changed
+27
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
1046 | 1047 | | |
1047 | 1048 | | |
1048 | 1049 | | |
1049 | | - | |
1050 | | - | |
1051 | 1050 | | |
1052 | 1051 | | |
1053 | 1052 | | |
| |||
1068 | 1067 | | |
1069 | 1068 | | |
1070 | 1069 | | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1071 | 1080 | | |
1072 | 1081 | | |
1073 | | - | |
1074 | | - | |
| 1082 | + | |
| 1083 | + | |
1075 | 1084 | | |
| 1085 | + | |
1076 | 1086 | | |
| 1087 | + | |
| 1088 | + | |
1077 | 1089 | | |
1078 | | - | |
1079 | | - | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1080 | 1099 | | |
1081 | 1100 | | |
1082 | 1101 | | |
1083 | 1102 | | |
1084 | 1103 | | |
1085 | 1104 | | |
1086 | 1105 | | |
1087 | | - | |
| 1106 | + | |
1088 | 1107 | | |
1089 | 1108 | | |
1090 | | - | |
| 1109 | + | |
1091 | 1110 | | |
1092 | 1111 | | |
1093 | 1112 | | |
| |||
0 commit comments