File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 17
17
#include <linux/kstrtox.h>
18
18
#include <linux/module.h>
19
19
#include <linux/slab.h>
20
- #include <linux/string.h>
21
20
#include <linux/kdev_t.h>
22
21
#include <linux/notifier.h>
23
22
#include <linux/of.h>
28
27
#include <linux/netdevice.h>
29
28
#include <linux/sched/signal.h>
30
29
#include <linux/sched/mm.h>
30
+ #include <linux/string_helpers.h>
31
31
#include <linux/swiotlb.h>
32
32
#include <linux/sysfs.h>
33
33
#include <linux/dma-map-ops.h> /* for dma_default_coherent */
@@ -3910,10 +3910,9 @@ const char *device_get_devnode(const struct device *dev,
3910
3910
return dev_name (dev );
3911
3911
3912
3912
/* replace '!' in the name with '/' */
3913
- s = kstrdup (dev_name (dev ), GFP_KERNEL );
3913
+ s = kstrdup_and_replace (dev_name (dev ), '!' , '/' , GFP_KERNEL );
3914
3914
if (!s )
3915
3915
return NULL ;
3916
- strreplace (s , '!' , '/' );
3917
3916
return * tmp = s ;
3918
3917
}
3919
3918
You can’t perform that action at this time.
0 commit comments