History

mfd: Remove unused helper syscon_regmap_lookup_by_pdevname

Nobody uses the exported helper syscon_regmap_lookup_by_pdevname, to lookup a device by name. Let us remove it.

Suzuki K Poulose committed 7 years ago

Commit 29d14b61 parent 209de312 files · +0 −27Browse files

Unified · Split

2 files
  1. drivers/mfd/syscon.c +0 −21
  2. include/linux/mfd/syscon.h +0 −6
drivers/mfd/syscon.c+0−21
@@ -190,27 +190,6 @@ struct regmap *syscon_regmap_lookup_by_compatible(const char *s) · 189 unmodified lines
190}190}
191EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible);191EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible);
192 192
193static int syscon_match_pdevname(struct device *dev, void *data)
194{
195 return !strcmp(dev_name(dev), (const char *)data);
196}
197
198struct 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}
212EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_pdevname);
213
214struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np,193struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np,
215 const char *property)194 const char *property)
216{195{
include/linux/mfd/syscon.h+0−6
@@ -19,7 +19,6 @@ struct device_node; · 18 unmodified lines
19#ifdef CONFIG_MFD_SYSCON19#ifdef CONFIG_MFD_SYSCON
20extern struct regmap *syscon_node_to_regmap(struct device_node *np);20extern struct regmap *syscon_node_to_regmap(struct device_node *np);
21extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);21extern struct regmap *syscon_regmap_lookup_by_compatible(const char *s);
22extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s);
23extern struct regmap *syscon_regmap_lookup_by_phandle(22extern struct regmap *syscon_regmap_lookup_by_phandle(
24 struct device_node *np,23 struct device_node *np,
25 const char *property);24 const char *property);
@@ -34,11 +33,6 @@ static inline struct regmap *syscon_regmap_lookup_by_compatible(const char *s) · 8 unmodified lines
34 return ERR_PTR(-ENOTSUPP);33 return ERR_PTR(-ENOTSUPP);
35}34}
36 35
37static inline struct regmap *syscon_regmap_lookup_by_pdevname(const char *s)
38{
39 return ERR_PTR(-ENOTSUPP);
40}
41
42static inline struct regmap *syscon_regmap_lookup_by_phandle(36static inline struct regmap *syscon_regmap_lookup_by_phandle(
43 struct device_node *np,37 struct device_node *np,
44 const char *property)38 const char *property)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t