Nobody uses the exported helper syscon_regmap_lookup_by_pdevname, to lookup a device by name. Let us remove it.
Unified · Split
| @@ -190,27 +190,6 @@ struct regmap *syscon_regmap_lookup_by_compatible(const char *s) · 189 unmodified lines | ||
| 190 | 190 | } |
| 191 | 191 | EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible); |
| 192 | 192 | |
| 193 | −static int syscon_match_pdevname(struct device *dev, void *data) | |
| 194 | −{ | |
| 195 | − return !strcmp(dev_name(dev), (const char *)data); | |
| 196 | −} | |
| 197 | − | |
| 198 | −struct regmap *syscon_regmap_lookup_by_pdevname(const char *s) | |
| 199 | −{ | |
| 200 | − struct device *dev; | |
| 201 | − struct syscon *syscon; | |
| 202 | − | |
| 203 | − dev = driver_find_device(&syscon_driver.driver, NULL, (void *)s, | |
| 204 | − syscon_match_pdevname); | |
| 205 | − if (!dev) | |
| 206 | − return ERR_PTR(-EPROBE_DEFER); | |
| 207 | − | |
| 208 | − syscon = dev_get_drvdata(dev); | |
| 209 | − | |
| 210 | − return syscon->regmap; | |
| 211 | −} | |
| 212 | −EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_pdevname); | |
| 213 | − | |
| 214 | 193 | struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np, |
| 215 | 194 | const char *property) |
| 216 | 195 | { |
| @@ -19,7 +19,6 @@ struct device_node; · 18 unmodified lines | ||
| 19 | 19 | #ifdef CONFIG_MFD_SYSCON |
| 20 | 20 | extern struct regmap *syscon_node_to_regmap(struct device_node *np); |
| 21 | 21 | extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s); |
| 22 | −extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s); | |
| 23 | 22 | extern struct regmap *syscon_regmap_lookup_by_phandle( |
| 24 | 23 | struct device_node *np, |
| 25 | 24 | const char *property); |
| @@ -34,11 +33,6 @@ static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s) · 8 unmodified lines | ||
| 34 | 33 | return ERR_PTR(-ENOTSUPP); |
| 35 | 34 | } |
| 36 | 35 | |
| 37 | −static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s) | |
| 38 | −{ | |
| 39 | − return ERR_PTR(-ENOTSUPP); | |
| 40 | −} | |
| 41 | − | |
| 42 | 36 | static inline struct regmap *syscon_regmap_lookup_by_phandle( |
| 43 | 37 | struct device_node *np, |
| 44 | 38 | const char *property) |