driver-core: remove conditionals around devicetree pointers
Having conditional around the of_match_table and the of_node pointers turns out to make driver code use ugly #ifdef blocks. Drop the conditionals and remove the #ifdef blocks from the affected drivers. Also tidy up minor whitespace issues within the same hunks. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -128,9 +128,7 @@ struct device_driver {
|
||||
|
||||
bool suppress_bind_attrs; /* disables bind/unbind via sysfs */
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
const struct of_device_id *of_match_table;
|
||||
#endif
|
||||
|
||||
int (*probe) (struct device *dev);
|
||||
int (*remove) (struct device *dev);
|
||||
@@ -441,9 +439,8 @@ struct device {
|
||||
override */
|
||||
/* arch specific additions */
|
||||
struct dev_archdata archdata;
|
||||
#ifdef CONFIG_OF
|
||||
struct device_node *of_node;
|
||||
#endif
|
||||
|
||||
struct device_node *of_node; /* associated device tree node */
|
||||
|
||||
dev_t devt; /* dev_t, creates the sysfs "dev" */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user