summaryrefslogtreecommitdiffstats
path: root/include/driver.h
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-10-16 12:15:42 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-10-18 09:02:24 +0200
commit3e06eceaf441cfbe02dc4c436dc77ac28a0e5cb9 (patch)
treecf56324d9dc49ad6bfa555b86668092387b21ce8 /include/driver.h
parente317adeeb7c50a5eeb0a88da39857c7cc6f9b366 (diff)
downloadbarebox-3e06eceaf441cfbe02dc4c436dc77ac28a0e5cb9.tar.gz
barebox-3e06eceaf441cfbe02dc4c436dc77ac28a0e5cb9.tar.xz
drivers: base: Convert device_d name to be dynamically allocated
Convert device_d name to be dynamically allocated in order to lift MAX_DRIVER_NAME length limit needed for commits that follow. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/driver.h')
-rw-r--r--include/driver.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/driver.h b/include/driver.h
index 94fddc735e..db844aed3d 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -23,7 +23,6 @@
#include <linux/ioport.h>
#include <of.h>
-#define MAX_DRIVER_NAME 32
#define FORMAT_DRIVER_NAME_ID "%s%d"
#include <param.h>
@@ -44,13 +43,13 @@ struct device_d {
* should not be modified directly and dev_set_name() should
* be used instead.
*/
- char name[MAX_DRIVER_NAME];
+ char *name;
/*! This member is used to store device's unique name as
* obtained by calling dev_id(). Internal field, do not
* access it directly.
*/
- char unique_name[MAX_DRIVER_NAME + 16];
+ char *unique_name;
/*! The id is used to uniquely identify a device in the system. The id
* will show up under /dev/ as the device's name. Usually this is
* something like eth0 or nor0. */