OF: move device node pointer into struct device.
Subsystems (43)
PATCH 27/37 drivers/of: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/of/device.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
drivers/of/device.c +10 -10
@@ -21,9 +21,9 @@const struct of_device_id *of_match_device (const struct of_device_id *matches,const struct of_device *dev) { -if (!dev->node) +if (!dev->dev.of_node)return NULL ; -return of_match_node (matches, dev->node); +return of_match_node (matches, dev->dev.of_node); }EXPORT_SYMBOL (of_match_device);
@@ -54,7 +54,7 @@ static ssize_t devspec_show(struct device *dev,struct of_device *ofdev; ofdev =to_of_device (dev); -return sprintf (buf,"%s\n" , ofdev->node->full_name); +return sprintf (buf,"%s\n" , ofdev->dev.of_node->full_name); } static ssize_t name_show(struct device *dev,
@@ -63,7 +63,7 @@ static ssize_t name_show(struct device *dev,struct of_device *ofdev; ofdev =to_of_device (dev); -return sprintf (buf,"%s\n" , ofdev->node->name); +return sprintf (buf,"%s\n" , ofdev->dev.of_node->name); } static ssize_t modalias_show(struct device *dev,
@@ -97,14 +97,14 @@ void of_release_dev(struct device *dev)struct of_device *ofdev; ofdev =to_of_device (dev); -of_node_put (ofdev->node); +of_node_put (ofdev->dev.of_node);kfree (ofdev); }EXPORT_SYMBOL (of_release_dev);int of_device_register (struct of_device *ofdev) { -BUG_ON (ofdev->node ==NULL ); +BUG_ON (ofdev->dev.of_node ==NULL );device_initialize (&ofdev->dev);
@@ -112,7 +112,7 @@ int of_device_register(struct of_device *ofdev)* the parent. If there is no parent defined, set the node * explicitly */ if (!ofdev->dev.parent) -set_dev_node (&ofdev->dev,of_node_to_nid (ofdev->node)); +set_dev_node (&ofdev->dev,of_node_to_nid (ofdev->dev.of_node));return device_add (&ofdev->dev); }
@@ -132,11 +132,11 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,ssize_t tsize, csize, repend;/* Name & Type */ - csize =snprintf (str, len,"of:N%sT%s" , - ofdev->node->name, ofdev->node->type); + csize =snprintf (str, len,"of:N%sT%s" , ofdev->dev.of_node->name, + ofdev->dev.of_node->type);/* Get compatible property if any */ - compat =of_get_property (ofdev->node,"compatible" , &cplen); + compat =of_get_property (ofdev->dev.of_node,"compatible" , &cplen);if (!compat)return csize;
PATCH 27/37 drivers/of: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/of/device.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
drivers/of/device.c +10 -10
@@ -21,9 +21,9 @@const struct of_device_id *of_match_device (const struct of_device_id *matches,const struct of_device *dev) { -if (!dev->node) +if (!dev->dev.of_node)return NULL ; -return of_match_node (matches, dev->node); +return of_match_node (matches, dev->dev.of_node); }EXPORT_SYMBOL (of_match_device);
@@ -54,7 +54,7 @@ static ssize_t devspec_show(struct device *dev,struct of_device *ofdev; ofdev =to_of_device (dev); -return sprintf (buf,"%s\n" , ofdev->node->full_name); +return sprintf (buf,"%s\n" , ofdev->dev.of_node->full_name); } static ssize_t name_show(struct device *dev,
@@ -63,7 +63,7 @@ static ssize_t name_show(struct device *dev,struct of_device *ofdev; ofdev =to_of_device (dev); -return sprintf (buf,"%s\n" , ofdev->node->name); +return sprintf (buf,"%s\n" , ofdev->dev.of_node->name); } static ssize_t modalias_show(struct device *dev,
@@ -97,14 +97,14 @@ void of_release_dev(struct device *dev)struct of_device *ofdev; ofdev =to_of_device (dev); -of_node_put (ofdev->node); +of_node_put (ofdev->dev.of_node);kfree (ofdev); }EXPORT_SYMBOL (of_release_dev);int of_device_register (struct of_device *ofdev) { -BUG_ON (ofdev->node ==NULL ); +BUG_ON (ofdev->dev.of_node ==NULL );device_initialize (&ofdev->dev);
@@ -112,7 +112,7 @@ int of_device_register(struct of_device *ofdev)* the parent. If there is no parent defined, set the node * explicitly */ if (!ofdev->dev.parent) -set_dev_node (&ofdev->dev,of_node_to_nid (ofdev->node)); +set_dev_node (&ofdev->dev,of_node_to_nid (ofdev->dev.of_node));return device_add (&ofdev->dev); }
@@ -132,11 +132,11 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,ssize_t tsize, csize, repend;/* Name & Type */ - csize =snprintf (str, len,"of:N%sT%s" , - ofdev->node->name, ofdev->node->type); + csize =snprintf (str, len,"of:N%sT%s" , ofdev->dev.of_node->name, + ofdev->dev.of_node->type);/* Get compatible property if any */ - compat =of_get_property (ofdev->node,"compatible" , &cplen); + compat =of_get_property (ofdev->dev.of_node,"compatible" , &cplen);if (!compat)return csize;
PATCH 27/37 drivers/of: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/of/device.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
drivers/of/device.c +10 -10
@@ -21,9 +21,9 @@const struct of_device_id *of_match_device (const struct of_device_id *matches,const struct of_device *dev) { -if (!dev->node) +if (!dev->dev.of_node)return NULL ; -return of_match_node (matches, dev->node); +return of_match_node (matches, dev->dev.of_node); }EXPORT_SYMBOL (of_match_device);
@@ -54,7 +54,7 @@ static ssize_t devspec_show(struct device *dev,struct of_device *ofdev; ofdev =to_of_device (dev); -return sprintf (buf,"%s\n" , ofdev->node->full_name); +return sprintf (buf,"%s\n" , ofdev->dev.of_node->full_name); } static ssize_t name_show(struct device *dev,
@@ -63,7 +63,7 @@ static ssize_t name_show(struct device *dev,struct of_device *ofdev; ofdev =to_of_device (dev); -return sprintf (buf,"%s\n" , ofdev->node->name); +return sprintf (buf,"%s\n" , ofdev->dev.of_node->name); } static ssize_t modalias_show(struct device *dev,
@@ -97,14 +97,14 @@ void of_release_dev(struct device *dev)struct of_device *ofdev; ofdev =to_of_device (dev); -of_node_put (ofdev->node); +of_node_put (ofdev->dev.of_node);kfree (ofdev); }EXPORT_SYMBOL (of_release_dev);int of_device_register (struct of_device *ofdev) { -BUG_ON (ofdev->node ==NULL ); +BUG_ON (ofdev->dev.of_node ==NULL );device_initialize (&ofdev->dev);
@@ -112,7 +112,7 @@ int of_device_register(struct of_device *ofdev)* the parent. If there is no parent defined, set the node * explicitly */ if (!ofdev->dev.parent) -set_dev_node (&ofdev->dev,of_node_to_nid (ofdev->node)); +set_dev_node (&ofdev->dev,of_node_to_nid (ofdev->dev.of_node));return device_add (&ofdev->dev); }
@@ -132,11 +132,11 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,ssize_t tsize, csize, repend;/* Name & Type */ - csize =snprintf (str, len,"of:N%sT%s" , - ofdev->node->name, ofdev->node->type); + csize =snprintf (str, len,"of:N%sT%s" , ofdev->dev.of_node->name, + ofdev->dev.of_node->type);/* Get compatible property if any */ - compat =of_get_property (ofdev->node,"compatible" , &cplen); + compat =of_get_property (ofdev->dev.of_node,"compatible" , &cplen);if (!compat)return csize;
PATCH 28/37 drivers/scsi: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ibmvscsi/ibmvfc.c +1 -1
@@ -1155,7 +1155,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost)static void ibmvfc_set_login_info (struct ibmvfc_host *vhost) {struct ibmvfc_npiv_login *login_info = &vhost->login_info; -struct device_node *of_node = vhost->dev->archdata.of_node; +struct device_node *of_node = vhost->dev->of_node;const char *location;memset (login_info,0 ,sizeof (*login_info));
drivers/scsi/ibmvscsi/ibmvscsi.c +1 -1
@@ -955,7 +955,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata)struct viosrp_capabilities *req;struct srp_event_struct *evt_struct;unsigned long flags; -struct device_node *of_node = hostdata->dev->archdata.of_node; +struct device_node *of_node = hostdata->dev->of_node;const char *location; evt_struct =get_event_struct (&hostdata->pool);
PATCH 28/37 drivers/scsi: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ibmvscsi/ibmvfc.c +1 -1
@@ -1155,7 +1155,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost)static void ibmvfc_set_login_info (struct ibmvfc_host *vhost) {struct ibmvfc_npiv_login *login_info = &vhost->login_info; -struct device_node *of_node = vhost->dev->archdata.of_node; +struct device_node *of_node = vhost->dev->of_node;const char *location;memset (login_info,0 ,sizeof (*login_info));
drivers/scsi/ibmvscsi/ibmvscsi.c +1 -1
@@ -955,7 +955,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata)struct viosrp_capabilities *req;struct srp_event_struct *evt_struct;unsigned long flags; -struct device_node *of_node = hostdata->dev->archdata.of_node; +struct device_node *of_node = hostdata->dev->of_node;const char *location; evt_struct =get_event_struct (&hostdata->pool);
PATCH 27/37 drivers/of: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/of/device.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
drivers/of/device.c +10 -10
@@ -21,9 +21,9 @@const struct of_device_id *of_match_device (const struct of_device_id *matches,const struct of_device *dev) { -if (!dev->node) +if (!dev->dev.of_node)return NULL ; -return of_match_node (matches, dev->node); +return of_match_node (matches, dev->dev.of_node); }EXPORT_SYMBOL (of_match_device);
@@ -54,7 +54,7 @@ static ssize_t devspec_show(struct device *dev,struct of_device *ofdev; ofdev =to_of_device (dev); -return sprintf (buf,"%s\n" , ofdev->node->full_name); +return sprintf (buf,"%s\n" , ofdev->dev.of_node->full_name); } static ssize_t name_show(struct device *dev,
@@ -63,7 +63,7 @@ static ssize_t name_show(struct device *dev,struct of_device *ofdev; ofdev =to_of_device (dev); -return sprintf (buf,"%s\n" , ofdev->node->name); +return sprintf (buf,"%s\n" , ofdev->dev.of_node->name); } static ssize_t modalias_show(struct device *dev,
@@ -97,14 +97,14 @@ void of_release_dev(struct device *dev)struct of_device *ofdev; ofdev =to_of_device (dev); -of_node_put (ofdev->node); +of_node_put (ofdev->dev.of_node);kfree (ofdev); }EXPORT_SYMBOL (of_release_dev);int of_device_register (struct of_device *ofdev) { -BUG_ON (ofdev->node ==NULL ); +BUG_ON (ofdev->dev.of_node ==NULL );device_initialize (&ofdev->dev);
@@ -112,7 +112,7 @@ int of_device_register(struct of_device *ofdev)* the parent. If there is no parent defined, set the node * explicitly */ if (!ofdev->dev.parent) -set_dev_node (&ofdev->dev,of_node_to_nid (ofdev->node)); +set_dev_node (&ofdev->dev,of_node_to_nid (ofdev->dev.of_node));return device_add (&ofdev->dev); }
@@ -132,11 +132,11 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,ssize_t tsize, csize, repend;/* Name & Type */ - csize =snprintf (str, len,"of:N%sT%s" , - ofdev->node->name, ofdev->node->type); + csize =snprintf (str, len,"of:N%sT%s" , ofdev->dev.of_node->name, + ofdev->dev.of_node->type);/* Get compatible property if any */ - compat =of_get_property (ofdev->node,"compatible" , &cplen); + compat =of_get_property (ofdev->dev.of_node,"compatible" , &cplen);if (!compat)return csize;
PATCH 29/37 drivers/char: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/char/viotape.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/viotape.c +1 -1
@@ -865,7 +865,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) {int i = vdev->unit_address;int j; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node;if (i >=VIOTAPE_MAX_TAPE )return -ENODEV ;
PATCH 29/37 drivers/char: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/char/viotape.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/viotape.c +1 -1
@@ -865,7 +865,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) {int i = vdev->unit_address;int j; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node;if (i >=VIOTAPE_MAX_TAPE )return -ENODEV ;
PATCH 28/37 drivers/scsi: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ibmvscsi/ibmvfc.c +1 -1
@@ -1155,7 +1155,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost)static void ibmvfc_set_login_info (struct ibmvfc_host *vhost) {struct ibmvfc_npiv_login *login_info = &vhost->login_info; -struct device_node *of_node = vhost->dev->archdata.of_node; +struct device_node *of_node = vhost->dev->of_node;const char *location;memset (login_info,0 ,sizeof (*login_info));
drivers/scsi/ibmvscsi/ibmvscsi.c +1 -1
@@ -955,7 +955,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata)struct viosrp_capabilities *req;struct srp_event_struct *evt_struct;unsigned long flags; -struct device_node *of_node = hostdata->dev->archdata.of_node; +struct device_node *of_node = hostdata->dev->of_node;const char *location; evt_struct =get_event_struct (&hostdata->pool);
PATCH 30/37 drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/cdrom/viocd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/cdrom/viocd.c +1 -1
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)struct disk_info *d;struct cdrom_device_info *c;struct request_queue *q; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node; deviceno = vdev->unit_address;if (deviceno >=VIOCD_MAX_CD )
PATCH 30/37 drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/cdrom/viocd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/cdrom/viocd.c +1 -1
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)struct disk_info *d;struct cdrom_device_info *c;struct request_queue *q; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node; deviceno = vdev->unit_address;if (deviceno >=VIOCD_MAX_CD )
PATCH 28/37 drivers/scsi: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ibmvscsi/ibmvfc.c +1 -1
@@ -1155,7 +1155,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost)static void ibmvfc_set_login_info (struct ibmvfc_host *vhost) {struct ibmvfc_npiv_login *login_info = &vhost->login_info; -struct device_node *of_node = vhost->dev->archdata.of_node; +struct device_node *of_node = vhost->dev->of_node;const char *location;memset (login_info,0 ,sizeof (*login_info));
drivers/scsi/ibmvscsi/ibmvscsi.c +1 -1
@@ -955,7 +955,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata)struct viosrp_capabilities *req;struct srp_event_struct *evt_struct;unsigned long flags; -struct device_node *of_node = hostdata->dev->archdata.of_node; +struct device_node *of_node = hostdata->dev->of_node;const char *location; evt_struct =get_event_struct (&hostdata->pool);
PATCH 28/37 drivers/scsi: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ibmvscsi/ibmvfc.c +1 -1
@@ -1155,7 +1155,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost)static void ibmvfc_set_login_info (struct ibmvfc_host *vhost) {struct ibmvfc_npiv_login *login_info = &vhost->login_info; -struct device_node *of_node = vhost->dev->archdata.of_node; +struct device_node *of_node = vhost->dev->of_node;const char *location;memset (login_info,0 ,sizeof (*login_info));
drivers/scsi/ibmvscsi/ibmvscsi.c +1 -1
@@ -955,7 +955,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata)struct viosrp_capabilities *req;struct srp_event_struct *evt_struct;unsigned long flags; -struct device_node *of_node = hostdata->dev->archdata.of_node; +struct device_node *of_node = hostdata->dev->of_node;const char *location; evt_struct =get_event_struct (&hostdata->pool);
PATCH 28/37 drivers/scsi: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ibmvscsi/ibmvfc.c +1 -1
@@ -1155,7 +1155,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost)static void ibmvfc_set_login_info (struct ibmvfc_host *vhost) {struct ibmvfc_npiv_login *login_info = &vhost->login_info; -struct device_node *of_node = vhost->dev->archdata.of_node; +struct device_node *of_node = vhost->dev->of_node;const char *location;memset (login_info,0 ,sizeof (*login_info));
drivers/scsi/ibmvscsi/ibmvscsi.c +1 -1
@@ -955,7 +955,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata)struct viosrp_capabilities *req;struct srp_event_struct *evt_struct;unsigned long flags; -struct device_node *of_node = hostdata->dev->archdata.of_node; +struct device_node *of_node = hostdata->dev->of_node;const char *location; evt_struct =get_event_struct (&hostdata->pool);
PATCH 29/37 drivers/char: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/char/viotape.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/viotape.c +1 -1
@@ -865,7 +865,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) {int i = vdev->unit_address;int j; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node;if (i >=VIOTAPE_MAX_TAPE )return -ENODEV ;
PATCH 29/37 drivers/char: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/char/viotape.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/viotape.c +1 -1
@@ -865,7 +865,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) {int i = vdev->unit_address;int j; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node;if (i >=VIOTAPE_MAX_TAPE )return -ENODEV ;
PATCH 29/37 drivers/char: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/char/viotape.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/viotape.c +1 -1
@@ -865,7 +865,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) {int i = vdev->unit_address;int j; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node;if (i >=VIOTAPE_MAX_TAPE )return -ENODEV ;
PATCH 29/37 drivers/char: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/char/viotape.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/viotape.c +1 -1
@@ -865,7 +865,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) {int i = vdev->unit_address;int j; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node;if (i >=VIOTAPE_MAX_TAPE )return -ENODEV ;
PATCH 30/37 drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/cdrom/viocd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/cdrom/viocd.c +1 -1
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)struct disk_info *d;struct cdrom_device_info *c;struct request_queue *q; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node; deviceno = vdev->unit_address;if (deviceno >=VIOCD_MAX_CD )
PATCH 30/37 drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/cdrom/viocd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/cdrom/viocd.c +1 -1
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)struct disk_info *d;struct cdrom_device_info *c;struct request_queue *q; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node; deviceno = vdev->unit_address;if (deviceno >=VIOCD_MAX_CD )
PATCH 30/37 drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/cdrom/viocd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/cdrom/viocd.c +1 -1
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)struct disk_info *d;struct cdrom_device_info *c;struct request_queue *q; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node; deviceno = vdev->unit_address;if (deviceno >=VIOCD_MAX_CD )
PATCH 30/37 drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/cdrom/viocd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/cdrom/viocd.c +1 -1
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)struct disk_info *d;struct cdrom_device_info *c;struct request_queue *q; -struct device_node *node = vdev->dev.archdata.of_node; +struct device_node *node = vdev->dev.of_node; deviceno = vdev->unit_address;if (deviceno >=VIOCD_MAX_CD )
PATCH 31/37 drivers/of: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/of/of_i2c.c | 1 - drivers/of/of_mdio.c | 1 - drivers/of/of_spi.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/of/of_i2c.c +0 -1
@@ -42,7 +42,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node);/* temporary */ info.of_node = node; info.archdata = &dev_ad;
drivers/of/of_mdio.c +0 -1
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)/* Associate the OF node with the device structure so it * can be looked up later */ of_node_get (child); -dev_archdata_set_node (&phy->dev.archdata, child);/* temp */ phy->dev.of_node = child;/* All data is now stored in the phy struct; register it */
drivers/of/of_spi.c +0 -1
@@ -80,7 +80,6 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)/* Store a pointer to the node in the device structure */ of_node_get (nc); spi->dev.of_node = nc; - spi->dev.archdata.of_node = nc;/* temporary */ /* Register the new device */ request_module (spi->modalias);
PATCH 31/37 drivers/of: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/of/of_i2c.c | 1 - drivers/of/of_mdio.c | 1 - drivers/of/of_spi.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/of/of_i2c.c +0 -1
@@ -42,7 +42,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node);/* temporary */ info.of_node = node; info.archdata = &dev_ad;
drivers/of/of_mdio.c +0 -1
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)/* Associate the OF node with the device structure so it * can be looked up later */ of_node_get (child); -dev_archdata_set_node (&phy->dev.archdata, child);/* temp */ phy->dev.of_node = child;/* All data is now stored in the phy struct; register it */
drivers/of/of_spi.c +0 -1
@@ -80,7 +80,6 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)/* Store a pointer to the node in the device structure */ of_node_get (nc); spi->dev.of_node = nc; - spi->dev.archdata.of_node = nc;/* temporary */ /* Register the new device */ request_module (spi->modalias);
PATCH 31/37 drivers/of: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/of/of_i2c.c | 1 - drivers/of/of_mdio.c | 1 - drivers/of/of_spi.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/of/of_i2c.c +0 -1
@@ -42,7 +42,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node);/* temporary */ info.of_node = node; info.archdata = &dev_ad;
drivers/of/of_mdio.c +0 -1
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)/* Associate the OF node with the device structure so it * can be looked up later */ of_node_get (child); -dev_archdata_set_node (&phy->dev.archdata, child);/* temp */ phy->dev.of_node = child;/* All data is now stored in the phy struct; register it */
drivers/of/of_spi.c +0 -1
@@ -80,7 +80,6 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)/* Store a pointer to the node in the device structure */ of_node_get (nc); spi->dev.of_node = nc; - spi->dev.archdata.of_node = nc;/* temporary */ /* Register the new device */ request_module (spi->modalias);
PATCH 31/37 drivers/of: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/of/of_i2c.c | 1 - drivers/of/of_mdio.c | 1 - drivers/of/of_spi.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/of/of_i2c.c +0 -1
@@ -42,7 +42,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node);/* temporary */ info.of_node = node; info.archdata = &dev_ad;
drivers/of/of_mdio.c +0 -1
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)/* Associate the OF node with the device structure so it * can be looked up later */ of_node_get (child); -dev_archdata_set_node (&phy->dev.archdata, child);/* temp */ phy->dev.of_node = child;/* All data is now stored in the phy struct; register it */
drivers/of/of_spi.c +0 -1
@@ -80,7 +80,6 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)/* Store a pointer to the node in the device structure */ of_node_get (nc); spi->dev.of_node = nc; - spi->dev.archdata.of_node = nc;/* temporary */ /* Register the new device */ request_module (spi->modalias);
PATCH 31/37 drivers/of: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/of/of_i2c.c | 1 - drivers/of/of_mdio.c | 1 - drivers/of/of_spi.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/of/of_i2c.c +0 -1
@@ -42,7 +42,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node);/* temporary */ info.of_node = node; info.archdata = &dev_ad;
drivers/of/of_mdio.c +0 -1
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)/* Associate the OF node with the device structure so it * can be looked up later */ of_node_get (child); -dev_archdata_set_node (&phy->dev.archdata, child);/* temp */ phy->dev.of_node = child;/* All data is now stored in the phy struct; register it */
drivers/of/of_spi.c +0 -1
@@ -80,7 +80,6 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)/* Store a pointer to the node in the device structure */ of_node_get (nc); spi->dev.of_node = nc; - spi->dev.archdata.of_node = nc;/* temporary */ /* Register the new device */ request_module (spi->modalias);
PATCH 31/37 drivers/of: use .of_node instead of .archdata.of_node in struct device
In reply to Grant Likely.archdata.node is being removed from Microblaze, SPARC and PowerPC.
---
drivers/of/of_i2c.c | 1 - drivers/of/of_mdio.c | 1 - drivers/of/of_spi.c | 1 - 3 files changed, 0 insertions(+), 3 deletions(-)
drivers/of/of_i2c.c +0 -1
@@ -42,7 +42,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node);/* temporary */ info.of_node = node; info.archdata = &dev_ad;
drivers/of/of_mdio.c +0 -1
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)/* Associate the OF node with the device structure so it * can be looked up later */ of_node_get (child); -dev_archdata_set_node (&phy->dev.archdata, child);/* temp */ phy->dev.of_node = child;/* All data is now stored in the phy struct; register it */
drivers/of/of_spi.c +0 -1
@@ -80,7 +80,6 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)/* Store a pointer to the node in the device structure */ of_node_get (nc); spi->dev.of_node = nc; - spi->dev.archdata.of_node = nc;/* temporary */ /* Register the new device */ request_module (spi->modalias);
PATCH 32/37 sound/aoa: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/aoa/fabrics/layout.c | 2 +- sound/aoa/soundbus/core.c | 8 ++++---- sound/aoa/soundbus/i2sbus/control.c | 2 +- sound/aoa/soundbus/i2sbus/core.c | 4 ++-- sound/aoa/soundbus/sysfs.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
sound/aoa/fabrics/layout.c +1 -1
@@ -991,7 +991,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)return -ENODEV ;/* by breaking out we keep a reference */ -while ((sound =of_get_next_child (sdev->ofdev.node, sound))) { +while ((sound =of_get_next_child (sdev->ofdev.dev.of_node, sound))) {if (sound->type &&strcasecmp (sound->type,"soundchip" ) =0 )break ; }
sound/aoa/soundbus/core.c +4 -4
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) of = &soundbus_dev->ofdev;/* stuff we want to pass to /sbin/hotplug */ - retval =add_uevent_var (env,"OF_NAME=%s" , of->node->name); + retval =add_uevent_var (env,"OF_NAME=%s" , of->dev.of_node->name);if (retval)return retval; - retval =add_uevent_var (env,"OF_TYPE=%s" , of->node->type); + retval =add_uevent_var (env,"OF_TYPE=%s" , of->dev.of_node->type);if (retval)return retval;
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)* it's not really legal to split it out with commas. We split it * up using a number of environment variables instead. */ - compat =of_get_property (of->node,"compatible" , &cplen); + compat =of_get_property (of->dev.of_node,"compatible" , &cplen);while (compat && cplen >0 ) {int tmp = env->buflen; retval =add_uevent_var (env,"OF_COMPATIBLE_%d=%s" , seen, compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)/* sanity checks */ if (!dev->attach_codec || - !dev->ofdev.node || + !dev->ofdev.dev.of_node || dev->pcmname || dev->pcmid !=-1 ) {printk (KERN_ERR "soundbus: adding device failed sanity check!\n" );
sound/aoa/soundbus/i2sbus/control.c +1 -1
@@ -41,7 +41,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, {struct device_node *np; - np = i2sdev->sound.ofdev.node; + np = i2sdev->sound.ofdev.dev.of_node; i2sdev->enable =pmf_find_function (np,"enable" ); i2sdev->cell_enable =pmf_find_function (np,"cell-enable" ); i2sdev->clock_enable =pmf_find_function (np,"clock-enable" );
sound/aoa/soundbus/i2sbus/core.c +2 -2
@@ -220,8 +220,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,mutex_init (&dev->lock);spin_lock_init (&dev->low_lock); - dev->sound.ofdev.node = np; dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; + dev->sound.ofdev.dev.of_node = np; dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; dev->sound.ofdev.dev.parent = &macio->ofdev.dev; dev->sound.ofdev.dev.release = i2sbus_release_dev;
@@ -345,7 +345,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)return -ENODEV ; } -while ((np =of_get_next_child (dev->ofdev.node, np))) { +while ((np =of_get_next_child (dev->ofdev.dev.of_node, np))) {if (of_device_is_compatible (np,"i2sbus" ) ||of_device_is_compatible (np,"i2s-modem" )) { got +=i2sbus_add_dev (dev, control, np);
sound/aoa/soundbus/sysfs.c +2 -2
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ char *buf) \ { \struct soundbus_dev *mdev =to_soundbus_device (dev); \ -return sprintf (buf, format_string, mdev->ofdev.node->field); \ +return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ } static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, length =strlen (buf); }else { length =sprintf (buf,"of:N%sT%s\n" , - of->node->name, of->node->type); + of->dev.of_node->name, of->dev.of_node->type); }return length;
PATCH 32/37 sound/aoa: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/aoa/fabrics/layout.c | 2 +- sound/aoa/soundbus/core.c | 8 ++++---- sound/aoa/soundbus/i2sbus/control.c | 2 +- sound/aoa/soundbus/i2sbus/core.c | 4 ++-- sound/aoa/soundbus/sysfs.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
sound/aoa/fabrics/layout.c +1 -1
@@ -991,7 +991,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)return -ENODEV ;/* by breaking out we keep a reference */ -while ((sound =of_get_next_child (sdev->ofdev.node, sound))) { +while ((sound =of_get_next_child (sdev->ofdev.dev.of_node, sound))) {if (sound->type &&strcasecmp (sound->type,"soundchip" ) ==0 )break ; }
sound/aoa/soundbus/core.c +4 -4
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) of = &soundbus_dev->ofdev;/* stuff we want to pass to /sbin/hotplug */ - retval =add_uevent_var (env,"OF_NAME=%s" , of->node->name); + retval =add_uevent_var (env,"OF_NAME=%s" , of->dev.of_node->name);if (retval)return retval; - retval =add_uevent_var (env,"OF_TYPE=%s" , of->node->type); + retval =add_uevent_var (env,"OF_TYPE=%s" , of->dev.of_node->type);if (retval)return retval;
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)* it's not really legal to split it out with commas. We split it * up using a number of environment variables instead. */ - compat =of_get_property (of->node,"compatible" , &cplen); + compat =of_get_property (of->dev.of_node,"compatible" , &cplen);while (compat && cplen >0 ) {int tmp = env->buflen; retval =add_uevent_var (env,"OF_COMPATIBLE_%d=%s" , seen, compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)/* sanity checks */ if (!dev->attach_codec || - !dev->ofdev.node || + !dev->ofdev.dev.of_node || dev->pcmname || dev->pcmid !=-1 ) {printk (KERN_ERR "soundbus: adding device failed sanity check!\n" );
sound/aoa/soundbus/i2sbus/control.c +1 -1
@@ -41,7 +41,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, {struct device_node *np; - np = i2sdev->sound.ofdev.node; + np = i2sdev->sound.ofdev.dev.of_node; i2sdev->enable =pmf_find_function (np,"enable" ); i2sdev->cell_enable =pmf_find_function (np,"cell-enable" ); i2sdev->clock_enable =pmf_find_function (np,"clock-enable" );
sound/aoa/soundbus/i2sbus/core.c +2 -2
@@ -220,8 +220,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,mutex_init (&dev->lock);spin_lock_init (&dev->low_lock); - dev->sound.ofdev.node = np; dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; + dev->sound.ofdev.dev.of_node = np; dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; dev->sound.ofdev.dev.parent = &macio->ofdev.dev; dev->sound.ofdev.dev.release = i2sbus_release_dev;
@@ -345,7 +345,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)return -ENODEV ; } -while ((np =of_get_next_child (dev->ofdev.node, np))) { +while ((np =of_get_next_child (dev->ofdev.dev.of_node, np))) {if (of_device_is_compatible (np,"i2sbus" ) ||of_device_is_compatible (np,"i2s-modem" )) { got +=i2sbus_add_dev (dev, control, np);
sound/aoa/soundbus/sysfs.c +2 -2
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ char *buf) \ { \struct soundbus_dev *mdev =to_soundbus_device (dev); \ -return sprintf (buf, format_string, mdev->ofdev.node->field); \ +return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ } static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, length =strlen (buf); }else { length =sprintf (buf,"of:N%sT%s\n" , - of->node->name, of->node->type); + of->dev.of_node->name, of->dev.of_node->type); }return length;
PATCH 32/37 sound/aoa: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/aoa/fabrics/layout.c | 2 +- sound/aoa/soundbus/core.c | 8 ++++---- sound/aoa/soundbus/i2sbus/control.c | 2 +- sound/aoa/soundbus/i2sbus/core.c | 4 ++-- sound/aoa/soundbus/sysfs.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
sound/aoa/fabrics/layout.c +1 -1
@@ -991,7 +991,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)return -ENODEV ;/* by breaking out we keep a reference */ -while ((sound =of_get_next_child (sdev->ofdev.node, sound))) { +while ((sound =of_get_next_child (sdev->ofdev.dev.of_node, sound))) {if (sound->type &&strcasecmp (sound->type,"soundchip" ) ==0 )break ; }
sound/aoa/soundbus/core.c +4 -4
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) of = &soundbus_dev->ofdev;/* stuff we want to pass to /sbin/hotplug */ - retval =add_uevent_var (env,"OF_NAME=%s" , of->node->name); + retval =add_uevent_var (env,"OF_NAME=%s" , of->dev.of_node->name);if (retval)return retval; - retval =add_uevent_var (env,"OF_TYPE=%s" , of->node->type); + retval =add_uevent_var (env,"OF_TYPE=%s" , of->dev.of_node->type);if (retval)return retval;
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)* it's not really legal to split it out with commas. We split it * up using a number of environment variables instead. */ - compat =of_get_property (of->node,"compatible" , &cplen); + compat =of_get_property (of->dev.of_node,"compatible" , &cplen);while (compat && cplen >0 ) {int tmp = env->buflen; retval =add_uevent_var (env,"OF_COMPATIBLE_%d=%s" , seen, compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)/* sanity checks */ if (!dev->attach_codec || - !dev->ofdev.node || + !dev->ofdev.dev.of_node || dev->pcmname || dev->pcmid !=-1 ) {printk (KERN_ERR "soundbus: adding device failed sanity check!\n" );
sound/aoa/soundbus/i2sbus/control.c +1 -1
@@ -41,7 +41,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, {struct device_node *np; - np = i2sdev->sound.ofdev.node; + np = i2sdev->sound.ofdev.dev.of_node; i2sdev->enable =pmf_find_function (np,"enable" ); i2sdev->cell_enable =pmf_find_function (np,"cell-enable" ); i2sdev->clock_enable =pmf_find_function (np,"clock-enable" );
sound/aoa/soundbus/i2sbus/core.c +2 -2
@@ -220,8 +220,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,mutex_init (&dev->lock);spin_lock_init (&dev->low_lock); - dev->sound.ofdev.node = np; dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; + dev->sound.ofdev.dev.of_node = np; dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; dev->sound.ofdev.dev.parent = &macio->ofdev.dev; dev->sound.ofdev.dev.release = i2sbus_release_dev;
@@ -345,7 +345,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)return -ENODEV ; } -while ((np =of_get_next_child (dev->ofdev.node, np))) { +while ((np =of_get_next_child (dev->ofdev.dev.of_node, np))) {if (of_device_is_compatible (np,"i2sbus" ) ||of_device_is_compatible (np,"i2s-modem" )) { got +=i2sbus_add_dev (dev, control, np);
sound/aoa/soundbus/sysfs.c +2 -2
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ char *buf) \ { \struct soundbus_dev *mdev =to_soundbus_device (dev); \ -return sprintf (buf, format_string, mdev->ofdev.node->field); \ +return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ } static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, length =strlen (buf); }else { length =sprintf (buf,"of:N%sT%s\n" , - of->node->name, of->node->type); + of->dev.of_node->name, of->dev.of_node->type); }return length;
PATCH 32/37 sound/aoa: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/aoa/fabrics/layout.c | 2 +- sound/aoa/soundbus/core.c | 8 ++++---- sound/aoa/soundbus/i2sbus/control.c | 2 +- sound/aoa/soundbus/i2sbus/core.c | 4 ++-- sound/aoa/soundbus/sysfs.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
sound/aoa/fabrics/layout.c +1 -1
@@ -991,7 +991,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)return -ENODEV ;/* by breaking out we keep a reference */ -while ((sound =of_get_next_child (sdev->ofdev.node, sound))) { +while ((sound =of_get_next_child (sdev->ofdev.dev.of_node, sound))) {if (sound->type &&strcasecmp (sound->type,"soundchip" ) ==0 )break ; }
sound/aoa/soundbus/core.c +4 -4
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) of = &soundbus_dev->ofdev;/* stuff we want to pass to /sbin/hotplug */ - retval =add_uevent_var (env,"OF_NAME=%s" , of->node->name); + retval =add_uevent_var (env,"OF_NAME=%s" , of->dev.of_node->name);if (retval)return retval; - retval =add_uevent_var (env,"OF_TYPE=%s" , of->node->type); + retval =add_uevent_var (env,"OF_TYPE=%s" , of->dev.of_node->type);if (retval)return retval;
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)* it's not really legal to split it out with commas. We split it * up using a number of environment variables instead. */ - compat =of_get_property (of->node,"compatible" , &cplen); + compat =of_get_property (of->dev.of_node,"compatible" , &cplen);while (compat && cplen >0 ) {int tmp = env->buflen; retval =add_uevent_var (env,"OF_COMPATIBLE_%d=%s" , seen, compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)/* sanity checks */ if (!dev->attach_codec || - !dev->ofdev.node || + !dev->ofdev.dev.of_node || dev->pcmname || dev->pcmid !=-1 ) {printk (KERN_ERR "soundbus: adding device failed sanity check!\n" );
sound/aoa/soundbus/i2sbus/control.c +1 -1
@@ -41,7 +41,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, {struct device_node *np; - np = i2sdev->sound.ofdev.node; + np = i2sdev->sound.ofdev.dev.of_node; i2sdev->enable =pmf_find_function (np,"enable" ); i2sdev->cell_enable =pmf_find_function (np,"cell-enable" ); i2sdev->clock_enable =pmf_find_function (np,"clock-enable" );
sound/aoa/soundbus/i2sbus/core.c +2 -2
@@ -220,8 +220,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,mutex_init (&dev->lock);spin_lock_init (&dev->low_lock); - dev->sound.ofdev.node = np; dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; + dev->sound.ofdev.dev.of_node = np; dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; dev->sound.ofdev.dev.parent = &macio->ofdev.dev; dev->sound.ofdev.dev.release = i2sbus_release_dev;
@@ -345,7 +345,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)return -ENODEV ; } -while ((np =of_get_next_child (dev->ofdev.node, np))) { +while ((np =of_get_next_child (dev->ofdev.dev.of_node, np))) {if (of_device_is_compatible (np,"i2sbus" ) ||of_device_is_compatible (np,"i2s-modem" )) { got +=i2sbus_add_dev (dev, control, np);
sound/aoa/soundbus/sysfs.c +2 -2
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ char *buf) \ { \struct soundbus_dev *mdev =to_soundbus_device (dev); \ -return sprintf (buf, format_string, mdev->ofdev.node->field); \ +return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ } static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, length =strlen (buf); }else { length =sprintf (buf,"of:N%sT%s\n" , - of->node->name, of->node->type); + of->dev.of_node->name, of->dev.of_node->type); }return length;
PATCH 32/37 sound/aoa: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/aoa/fabrics/layout.c | 2 +- sound/aoa/soundbus/core.c | 8 ++++---- sound/aoa/soundbus/i2sbus/control.c | 2 +- sound/aoa/soundbus/i2sbus/core.c | 4 ++-- sound/aoa/soundbus/sysfs.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
sound/aoa/fabrics/layout.c +1 -1
@@ -991,7 +991,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)return -ENODEV ;/* by breaking out we keep a reference */ -while ((sound =of_get_next_child (sdev->ofdev.node, sound))) { +while ((sound =of_get_next_child (sdev->ofdev.dev.of_node, sound))) {if (sound->type &&strcasecmp (sound->type,"soundchip" ) ==0 )break ; }
sound/aoa/soundbus/core.c +4 -4
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) of = &soundbus_dev->ofdev;/* stuff we want to pass to /sbin/hotplug */ - retval =add_uevent_var (env,"OF_NAME=%s" , of->node->name); + retval =add_uevent_var (env,"OF_NAME=%s" , of->dev.of_node->name);if (retval)return retval; - retval =add_uevent_var (env,"OF_TYPE=%s" , of->node->type); + retval =add_uevent_var (env,"OF_TYPE=%s" , of->dev.of_node->type);if (retval)return retval;
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)* it's not really legal to split it out with commas. We split it * up using a number of environment variables instead. */ - compat =of_get_property (of->node,"compatible" , &cplen); + compat =of_get_property (of->dev.of_node,"compatible" , &cplen);while (compat && cplen >0 ) {int tmp = env->buflen; retval =add_uevent_var (env,"OF_COMPATIBLE_%d=%s" , seen, compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)/* sanity checks */ if (!dev->attach_codec || - !dev->ofdev.node || + !dev->ofdev.dev.of_node || dev->pcmname || dev->pcmid !=-1 ) {printk (KERN_ERR "soundbus: adding device failed sanity check!\n" );
sound/aoa/soundbus/i2sbus/control.c +1 -1
@@ -41,7 +41,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, {struct device_node *np; - np = i2sdev->sound.ofdev.node; + np = i2sdev->sound.ofdev.dev.of_node; i2sdev->enable =pmf_find_function (np,"enable" ); i2sdev->cell_enable =pmf_find_function (np,"cell-enable" ); i2sdev->clock_enable =pmf_find_function (np,"clock-enable" );
sound/aoa/soundbus/i2sbus/core.c +2 -2
@@ -220,8 +220,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,mutex_init (&dev->lock);spin_lock_init (&dev->low_lock); - dev->sound.ofdev.node = np; dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; + dev->sound.ofdev.dev.of_node = np; dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; dev->sound.ofdev.dev.parent = &macio->ofdev.dev; dev->sound.ofdev.dev.release = i2sbus_release_dev;
@@ -345,7 +345,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)return -ENODEV ; } -while ((np =of_get_next_child (dev->ofdev.node, np))) { +while ((np =of_get_next_child (dev->ofdev.dev.of_node, np))) {if (of_device_is_compatible (np,"i2sbus" ) ||of_device_is_compatible (np,"i2s-modem" )) { got +=i2sbus_add_dev (dev, control, np);
sound/aoa/soundbus/sysfs.c +2 -2
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ char *buf) \ { \struct soundbus_dev *mdev =to_soundbus_device (dev); \ -return sprintf (buf, format_string, mdev->ofdev.node->field); \ +return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ } static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, length =strlen (buf); }else { length =sprintf (buf,"of:N%sT%s\n" , - of->node->name, of->node->type); + of->dev.of_node->name, of->dev.of_node->type); }return length;
PATCH 33/37 sound/soc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/soc/fsl/mpc8610_hpcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/mpc8610_hpcd.c +1 -1
@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {static int mpc8610_hpcd_probe (struct of_device *ofdev,const struct of_device_id *match) { -struct device_node *np = ofdev->node; +struct device_node *np = ofdev->dev.of_node;struct device_node *codec_np =NULL ;struct device_node *guts_np =NULL ;struct device_node *dma_np =NULL ;
PATCH 33/37 sound/soc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/soc/fsl/mpc8610_hpcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/mpc8610_hpcd.c +1 -1
@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {static int mpc8610_hpcd_probe (struct of_device *ofdev,const struct of_device_id *match) { -struct device_node *np = ofdev->node; +struct device_node *np = ofdev->dev.of_node;struct device_node *codec_np =NULL ;struct device_node *guts_np =NULL ;struct device_node *dma_np =NULL ;
PATCH 32/37 sound/aoa: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/aoa/fabrics/layout.c | 2 +- sound/aoa/soundbus/core.c | 8 ++++---- sound/aoa/soundbus/i2sbus/control.c | 2 +- sound/aoa/soundbus/i2sbus/core.c | 4 ++-- sound/aoa/soundbus/sysfs.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
sound/aoa/fabrics/layout.c +1 -1
@@ -991,7 +991,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)return -ENODEV ;/* by breaking out we keep a reference */ -while ((sound =of_get_next_child (sdev->ofdev.node, sound))) { +while ((sound =of_get_next_child (sdev->ofdev.dev.of_node, sound))) {if (sound->type &&strcasecmp (sound->type,"soundchip" ) ==0 )break ; }
sound/aoa/soundbus/core.c +4 -4
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) of = &soundbus_dev->ofdev;/* stuff we want to pass to /sbin/hotplug */ - retval =add_uevent_var (env,"OF_NAME=%s" , of->node->name); + retval =add_uevent_var (env,"OF_NAME=%s" , of->dev.of_node->name);if (retval)return retval; - retval =add_uevent_var (env,"OF_TYPE=%s" , of->node->type); + retval =add_uevent_var (env,"OF_TYPE=%s" , of->dev.of_node->type);if (retval)return retval;
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)* it's not really legal to split it out with commas. We split it * up using a number of environment variables instead. */ - compat =of_get_property (of->node,"compatible" , &cplen); + compat =of_get_property (of->dev.of_node,"compatible" , &cplen);while (compat && cplen >0 ) {int tmp = env->buflen; retval =add_uevent_var (env,"OF_COMPATIBLE_%d=%s" , seen, compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)/* sanity checks */ if (!dev->attach_codec || - !dev->ofdev.node || + !dev->ofdev.dev.of_node || dev->pcmname || dev->pcmid !=-1 ) {printk (KERN_ERR "soundbus: adding device failed sanity check!\n" );
sound/aoa/soundbus/i2sbus/control.c +1 -1
@@ -41,7 +41,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, {struct device_node *np; - np = i2sdev->sound.ofdev.node; + np = i2sdev->sound.ofdev.dev.of_node; i2sdev->enable =pmf_find_function (np,"enable" ); i2sdev->cell_enable =pmf_find_function (np,"cell-enable" ); i2sdev->clock_enable =pmf_find_function (np,"clock-enable" );
sound/aoa/soundbus/i2sbus/core.c +2 -2
@@ -220,8 +220,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,mutex_init (&dev->lock);spin_lock_init (&dev->low_lock); - dev->sound.ofdev.node = np; dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; + dev->sound.ofdev.dev.of_node = np; dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; dev->sound.ofdev.dev.parent = &macio->ofdev.dev; dev->sound.ofdev.dev.release = i2sbus_release_dev;
@@ -345,7 +345,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)return -ENODEV ; } -while ((np =of_get_next_child (dev->ofdev.node, np))) { +while ((np =of_get_next_child (dev->ofdev.dev.of_node, np))) {if (of_device_is_compatible (np,"i2sbus" ) ||of_device_is_compatible (np,"i2s-modem" )) { got +=i2sbus_add_dev (dev, control, np);
sound/aoa/soundbus/sysfs.c +2 -2
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ char *buf) \ { \struct soundbus_dev *mdev =to_soundbus_device (dev); \ -return sprintf (buf, format_string, mdev->ofdev.node->field); \ +return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ } static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, length =strlen (buf); }else { length =sprintf (buf,"of:N%sT%s\n" , - of->node->name, of->node->type); + of->dev.of_node->name, of->dev.of_node->type); }return length;
PATCH 34/37 sound/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/sparc/cs4231.c | 6 +++--- sound/sparc/dbri.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/sparc/cs4231.c +3 -3
@@ -2076,12 +2076,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_devstatic int __devinit cs4231_probe (struct of_device *op,const struct of_device_id *match) {#ifdef EBUS_SUPPORT -if (!strcmp (op->node->parent->name,"ebus" )) +if (!strcmp (op->dev.of_node->parent->name,"ebus" ))return cs4231_ebus_probe (op, match);#endif #ifdef SBUS_SUPPORT -if (!strcmp (op->node->parent->name,"sbus" ) || - !strcmp (op->node->parent->name,"sbi" )) +if (!strcmp (op->dev.of_node->parent->name,"sbus" ) || + !strcmp (op->dev.of_node->parent->name,"sbi" ))return cs4231_sbus_probe (op, match);#endif return -ENODEV ;
sound/sparc/dbri.c +1 -1
@@ -2650,7 +2650,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_idprintk (KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n" , dev, dbri->regs, - dbri->irq, op->node->name[9 ], dbri->mm.version); + dbri->irq, op->dev.of_node->name[9 ], dbri->mm.version); dev++;return 0 ;
PATCH 34/37 sound/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/sparc/cs4231.c | 6 +++--- sound/sparc/dbri.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/sparc/cs4231.c +3 -3
@@ -2076,12 +2076,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_devstatic int __devinit cs4231_probe (struct of_device *op,const struct of_device_id *match) {#ifdef EBUS_SUPPORT -if (!strcmp (op->node->parent->name,"ebus" )) +if (!strcmp (op->dev.of_node->parent->name,"ebus" ))return cs4231_ebus_probe (op, match);#endif #ifdef SBUS_SUPPORT -if (!strcmp (op->node->parent->name,"sbus" ) || - !strcmp (op->node->parent->name,"sbi" )) +if (!strcmp (op->dev.of_node->parent->name,"sbus" ) || + !strcmp (op->dev.of_node->parent->name,"sbi" ))return cs4231_sbus_probe (op, match);#endif return -ENODEV ;
sound/sparc/dbri.c +1 -1
@@ -2650,7 +2650,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_idprintk (KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n" , dev, dbri->regs, - dbri->irq, op->node->name[9 ], dbri->mm.version); + dbri->irq, op->dev.of_node->name[9 ], dbri->mm.version); dev++;return 0 ;
PATCH 32/37 sound/aoa: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/aoa/fabrics/layout.c | 2 +- sound/aoa/soundbus/core.c | 8 ++++---- sound/aoa/soundbus/i2sbus/control.c | 2 +- sound/aoa/soundbus/i2sbus/core.c | 4 ++-- sound/aoa/soundbus/sysfs.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
sound/aoa/fabrics/layout.c +1 -1
@@ -991,7 +991,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)return -ENODEV ;/* by breaking out we keep a reference */ -while ((sound =of_get_next_child (sdev->ofdev.node, sound))) { +while ((sound =of_get_next_child (sdev->ofdev.dev.of_node, sound))) {if (sound->type &&strcasecmp (sound->type,"soundchip" ) ==0 )break ; }
sound/aoa/soundbus/core.c +4 -4
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) of = &soundbus_dev->ofdev;/* stuff we want to pass to /sbin/hotplug */ - retval =add_uevent_var (env,"OF_NAME=%s" , of->node->name); + retval =add_uevent_var (env,"OF_NAME=%s" , of->dev.of_node->name);if (retval)return retval; - retval =add_uevent_var (env,"OF_TYPE=%s" , of->node->type); + retval =add_uevent_var (env,"OF_TYPE=%s" , of->dev.of_node->type);if (retval)return retval;
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)* it's not really legal to split it out with commas. We split it * up using a number of environment variables instead. */ - compat =of_get_property (of->node,"compatible" , &cplen); + compat =of_get_property (of->dev.of_node,"compatible" , &cplen);while (compat && cplen >0 ) {int tmp = env->buflen; retval =add_uevent_var (env,"OF_COMPATIBLE_%d=%s" , seen, compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)/* sanity checks */ if (!dev->attach_codec || - !dev->ofdev.node || + !dev->ofdev.dev.of_node || dev->pcmname || dev->pcmid !=-1 ) {printk (KERN_ERR "soundbus: adding device failed sanity check!\n" );
sound/aoa/soundbus/i2sbus/control.c +1 -1
@@ -41,7 +41,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c, {struct device_node *np; - np = i2sdev->sound.ofdev.node; + np = i2sdev->sound.ofdev.dev.of_node; i2sdev->enable =pmf_find_function (np,"enable" ); i2sdev->cell_enable =pmf_find_function (np,"cell-enable" ); i2sdev->clock_enable =pmf_find_function (np,"clock-enable" );
sound/aoa/soundbus/i2sbus/core.c +2 -2
@@ -220,8 +220,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,mutex_init (&dev->lock);spin_lock_init (&dev->low_lock); - dev->sound.ofdev.node = np; dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask; + dev->sound.ofdev.dev.of_node = np; dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask; dev->sound.ofdev.dev.parent = &macio->ofdev.dev; dev->sound.ofdev.dev.release = i2sbus_release_dev;
@@ -345,7 +345,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)return -ENODEV ; } -while ((np =of_get_next_child (dev->ofdev.node, np))) { +while ((np =of_get_next_child (dev->ofdev.dev.of_node, np))) {if (of_device_is_compatible (np,"i2sbus" ) ||of_device_is_compatible (np,"i2s-modem" )) { got +=i2sbus_add_dev (dev, control, np);
sound/aoa/soundbus/sysfs.c +2 -2
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ char *buf) \ { \struct soundbus_dev *mdev =to_soundbus_device (dev); \ -return sprintf (buf, format_string, mdev->ofdev.node->field); \ +return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ } static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, length =strlen (buf); }else { length =sprintf (buf,"of:N%sT%s\n" , - of->node->name, of->node->type); + of->dev.of_node->name, of->dev.of_node->type); }return length;
PATCH 33/37 sound/soc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/soc/fsl/mpc8610_hpcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/mpc8610_hpcd.c +1 -1
@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {static int mpc8610_hpcd_probe (struct of_device *ofdev,const struct of_device_id *match) { -struct device_node *np = ofdev->node; +struct device_node *np = ofdev->dev.of_node;struct device_node *codec_np =NULL ;struct device_node *guts_np =NULL ;struct device_node *dma_np =NULL ;
Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device
Quoted 3 lines · Grant Likely
.node is being removed
Signed-off-by Grant Likely <[email protected]>
but please ensure that Liam and especially Timur also check this (both CCed).
For enormous patch serieses like this it's really nice if you can ensure that each person is only CCed on the patches that they need to review. Much less stuff in the inbox.
Quoted 19 lines
---
sound/soc/fsl/mpc8610_hpcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)sound/soc/fsl/mpc8610_hpcd.c +1
-1@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {static int mpc8610_hpcd_probe (struct of_device *ofdev,const struct of_device_id *match) { -struct device_node *np = ofdev->node; +struct device_node *np = ofdev->dev.of_node;struct device_node *codec_np =NULL ;struct device_node *guts_np =NULL ;struct device_node *dma_np =NULL ;
Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device
Quoted 5 lines · Mark Brown
Quoted 3 lines · Grant Likely
.node is being removed
Signed-off-by Grant Likely <[email protected]>
Quoted 8 lines
Acked-by Mark Brown <[email protected]>but please ensure that Liam and especially Timur also check this (both CCed).
For enormous patch serieses like this it's really nice if you can ensure that each person is only CCed on the patches that they need to review. Much less stuff in the inbox.
Yeah, sorry about that (and to everyone receiving this thread, I'm really sorry. I won't do it again). I've already been yelled at for that. What happened is that on a previous series I was yelled at for not sending all patches to everyone (so that the patches could be reviewed in context). So, naturally, I made sure to include everyone on the whole series this time.... doh.
Next time I post I'll constrain it to small chunks.
Thanks for the review.
g.
Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device
Quoted 16 lines · Grant Likely
Quoted 5 lines · Mark Brown
Quoted 3 lines · Grant Likely
.node is being removed
Signed-off-by Grant Likely <[email protected]>Quoted 8 lines
Acked-by Mark Brown <[email protected]>but please ensure that Liam and especially Timur also check this (both CCed).
For enormous patch serieses like this it's really nice if you can ensure that each person is only CCed on the patches that they need to review. Much less stuff in the inbox.
Quoted 8 lines
Yeah, sorry about that (and to everyone receiving this thread, I'm really sorry. I won't do it again). I've already been yelled at for that. What happened is that on a previous series I was yelled at for not sending all patches to everyone (so that the patches could be reviewed in context). So, naturally, I made sure to include everyone on the whole series this time.... doh.
Next time I post I'll constrain it to small chunks.
A good compromise IMHO is to send only the pieces they really have to see and ack to each person, and provide a pointer to somewhere the full series can be seen and downloaded for the interested.
Signature · 1 line
Jean Delvare
Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device
In reply to Grant LikelyQuoted 13 lines · Grant Likely
.node is being removed
Signed-off-by Grant Likely <grant.likely-s3s/[email protected]>---
sound/soc/fsl/mpc8610_hpcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)sound/soc/fsl/mpc8610_hpcd.c +0
-0
sound/soc/fsl/mpc8610_hpcd.c static struct snd_soc_ops mpc8610_hpcd_ops = { · line 208
Quoted 8 lines
sound/soc/fsl/mpc8610_hpcd.c +1
-1@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {static int mpc8610_hpcd_probe (struct of_device *ofdev,const struct of_device_id *match) { -struct device_node *np = ofdev->node; +struct device_node *np = ofdev->dev.of_node;struct device_node *codec_np =NULL ;struct device_node *guts_np =NULL ;struct device_node *dma_np =NULL ;
This looks like one case where an inline function would have been a help.
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'
Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device
Hi Ben, thanks for the comment. Reply below...
Quoted 2 lines · Ben Dooks
Quoted 1 line · Grant Likely
.node is being removed
[...]
Quoted 6 lines
Quoted 6 lines
sound/soc/fsl/mpc8610_hpcd.c +0
-0@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = { static int mpc8610_hpcd_probe(struct of_device *ofdev, const struct of_device_id *match) {
Quoted 8 lines
sound/soc/fsl/mpc8610_hpcd.c static struct snd_soc_ops mpc8610_hpcd_ops = { · line 208
Quoted 5 lines
sound/soc/fsl/mpc8610_hpcd.c +1
-1- struct device_node *np = ofdev->node; + struct device_node *np = ofdev->dev.of_node; struct device_node *codec_np = NULL; struct device_node *guts_np = NULL; struct device_node *dma_np = NULL;This looks like one case where an inline function would have been a help.
In what regard (how would you like it to look)? The node pointer location is very unlikely to move again, and I prefer the clarity of direct dereferencing.
g.
PATCH 33/37 sound/soc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/soc/fsl/mpc8610_hpcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/mpc8610_hpcd.c +1 -1
@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {static int mpc8610_hpcd_probe (struct of_device *ofdev,const struct of_device_id *match) { -struct device_node *np = ofdev->node; +struct device_node *np = ofdev->dev.of_node;struct device_node *codec_np =NULL ;struct device_node *guts_np =NULL ;struct device_node *dma_np =NULL ;
PATCH 33/37 sound/soc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/soc/fsl/mpc8610_hpcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/mpc8610_hpcd.c +1 -1
@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {static int mpc8610_hpcd_probe (struct of_device *ofdev,const struct of_device_id *match) { -struct device_node *np = ofdev->node; +struct device_node *np = ofdev->dev.of_node;struct device_node *codec_np =NULL ;struct device_node *guts_np =NULL ;struct device_node *dma_np =NULL ;
PATCH 33/37 sound/soc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/soc/fsl/mpc8610_hpcd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/fsl/mpc8610_hpcd.c +1 -1
@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {static int mpc8610_hpcd_probe (struct of_device *ofdev,const struct of_device_id *match) { -struct device_node *np = ofdev->node; +struct device_node *np = ofdev->dev.of_node;struct device_node *codec_np =NULL ;struct device_node *guts_np =NULL ;struct device_node *dma_np =NULL ;
PATCH 34/37 sound/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/sparc/cs4231.c | 6 +++--- sound/sparc/dbri.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/sparc/cs4231.c +3 -3
@@ -2076,12 +2076,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_devstatic int __devinit cs4231_probe (struct of_device *op,const struct of_device_id *match) {#ifdef EBUS_SUPPORT -if (!strcmp (op->node->parent->name,"ebus" )) +if (!strcmp (op->dev.of_node->parent->name,"ebus" ))return cs4231_ebus_probe (op, match);#endif #ifdef SBUS_SUPPORT -if (!strcmp (op->node->parent->name,"sbus" ) || - !strcmp (op->node->parent->name,"sbi" )) +if (!strcmp (op->dev.of_node->parent->name,"sbus" ) || + !strcmp (op->dev.of_node->parent->name,"sbi" ))return cs4231_sbus_probe (op, match);#endif return -ENODEV ;
sound/sparc/dbri.c +1 -1
@@ -2650,7 +2650,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_idprintk (KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n" , dev, dbri->regs, - dbri->irq, op->node->name[9 ], dbri->mm.version); + dbri->irq, op->dev.of_node->name[9 ], dbri->mm.version); dev++;return 0 ;
PATCH 34/37 sound/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/sparc/cs4231.c | 6 +++--- sound/sparc/dbri.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/sparc/cs4231.c +3 -3
@@ -2076,12 +2076,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_devstatic int __devinit cs4231_probe (struct of_device *op,const struct of_device_id *match) {#ifdef EBUS_SUPPORT -if (!strcmp (op->node->parent->name,"ebus" )) +if (!strcmp (op->dev.of_node->parent->name,"ebus" ))return cs4231_ebus_probe (op, match);#endif #ifdef SBUS_SUPPORT -if (!strcmp (op->node->parent->name,"sbus" ) || - !strcmp (op->node->parent->name,"sbi" )) +if (!strcmp (op->dev.of_node->parent->name,"sbus" ) || + !strcmp (op->dev.of_node->parent->name,"sbi" ))return cs4231_sbus_probe (op, match);#endif return -ENODEV ;
sound/sparc/dbri.c +1 -1
@@ -2650,7 +2650,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_idprintk (KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n" , dev, dbri->regs, - dbri->irq, op->node->name[9 ], dbri->mm.version); + dbri->irq, op->dev.of_node->name[9 ], dbri->mm.version); dev++;return 0 ;
PATCH 34/37 sound/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/sparc/cs4231.c | 6 +++--- sound/sparc/dbri.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/sparc/cs4231.c +3 -3
@@ -2076,12 +2076,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_devstatic int __devinit cs4231_probe (struct of_device *op,const struct of_device_id *match) {#ifdef EBUS_SUPPORT -if (!strcmp (op->node->parent->name,"ebus" )) +if (!strcmp (op->dev.of_node->parent->name,"ebus" ))return cs4231_ebus_probe (op, match);#endif #ifdef SBUS_SUPPORT -if (!strcmp (op->node->parent->name,"sbus" ) || - !strcmp (op->node->parent->name,"sbi" )) +if (!strcmp (op->dev.of_node->parent->name,"sbus" ) || + !strcmp (op->dev.of_node->parent->name,"sbi" ))return cs4231_sbus_probe (op, match);#endif return -ENODEV ;
sound/sparc/dbri.c +1 -1
@@ -2650,7 +2650,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_idprintk (KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n" , dev, dbri->regs, - dbri->irq, op->node->name[9 ], dbri->mm.version); + dbri->irq, op->dev.of_node->name[9 ], dbri->mm.version); dev++;return 0 ;
PATCH 34/37 sound/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
sound/sparc/cs4231.c | 6 +++--- sound/sparc/dbri.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/sparc/cs4231.c +3 -3
@@ -2076,12 +2076,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_devstatic int __devinit cs4231_probe (struct of_device *op,const struct of_device_id *match) {#ifdef EBUS_SUPPORT -if (!strcmp (op->node->parent->name,"ebus" )) +if (!strcmp (op->dev.of_node->parent->name,"ebus" ))return cs4231_ebus_probe (op, match);#endif #ifdef SBUS_SUPPORT -if (!strcmp (op->node->parent->name,"sbus" ) || - !strcmp (op->node->parent->name,"sbi" )) +if (!strcmp (op->dev.of_node->parent->name,"sbus" ) || + !strcmp (op->dev.of_node->parent->name,"sbi" ))return cs4231_sbus_probe (op, match);#endif return -ENODEV ;
sound/sparc/dbri.c +1 -1
@@ -2650,7 +2650,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_idprintk (KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n" , dev, dbri->regs, - dbri->irq, op->node->name[9 ], dbri->mm.version); + dbri->irq, op->dev.of_node->name[9 ], dbri->mm.version); dev++;return 0 ;
PATCH 35/37 arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/powerpc/include/asm/device.h | 16 ++++++++-------- arch/powerpc/include/asm/of_device.h | 1 - arch/powerpc/kernel/of_device.c | 4 +--- arch/powerpc/kernel/pci-common.c | 1 - arch/powerpc/kernel/vio.c | 17 ++++++++--------- arch/powerpc/platforms/cell/iommu.c | 5 ++--- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/ps3/system-bus.c | 1 - arch/powerpc/platforms/pseries/iommu.c | 2 +- 9 files changed, 22 insertions(+), 29 deletions(-)
arch/powerpc/include/asm/device.h +8 -8
@@ -10,8 +10,14 @@ struct dma_map_ops;struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; +/* +* struct device_node *of_node; +* This has been removed and moved into struct device proper. If +* this broke your code, then replace +* (struct device *)->archdata.of_node +* with +* (struct device *)->of_node +*/ /* DMA operations on that device */ struct dma_map_ops *dma_ops;
@@ -30,12 +36,6 @@ struct dev_archdata {#endif }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -struct pdev_archdata { };
arch/powerpc/include/asm/of_device.h +0 -1
@@ -12,7 +12,6 @@*/ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/powerpc/kernel/of_device.c +1 -3
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev,"%s" , bus_id);
arch/powerpc/kernel/pci-common.c +0 -1
@@ -1112,7 +1112,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)continue ;/* Setup OF node pointer in the device */ - sd->of_node =pci_device_to_OF_node (dev);/* temporary */ dev->dev.of_node =pci_device_to_OF_node (dev);/* Fixup NUMA node as it may not be setup yet by the generic
arch/powerpc/kernel/vio.c +8 -9
@@ -704,7 +704,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)* Check to see that device has a DMA window and configure * entitlement for the device. */ -if (of_get_property (viodev->dev.archdata.of_node, +if (of_get_property (viodev->dev.of_node,"ibm,my-dma-window" ,NULL )) {/* Check that the driver is CMO enabled and get desired DMA */ if (!viodrv->get_desired_dma) {
@@ -1048,7 +1048,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (firmware_has_feature (FW_FEATURE_ISERIES ))return vio_build_iommu_table_iseries (dev); - dma_window =of_get_property (dev->dev.archdata.of_node, + dma_window =of_get_property (dev->dev.of_node,"ibm,my-dma-window" ,NULL );if (!dma_window)return NULL ;
@@ -1057,7 +1057,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (tbl =NULL )return NULL ; -of_parse_dma_window (dev->dev.archdata.of_node, dma_window, +of_parse_dma_window (dev->dev.of_node, dma_window, &tbl->it_index, &offset, &size);/* TCE table size - measured in tce entries */
@@ -1085,7 +1085,7 @@ static const struct vio_device_id *vio_match_device( {while (ids->type[0 ] !='\0' ) {if ((strncmp (dev->type, ids->type,strlen (ids->type)) =0 ) && -of_device_is_compatible (dev->dev.archdata.of_node, +of_device_is_compatible (dev->dev.of_node, ids->compat))return ids; ids++;
@@ -1178,7 +1178,7 @@ EXPORT_SYMBOL(vio_unregister_driver);static void __devinit vio_dev_release (struct device *dev) {/* XXX should free TCE table */ -of_node_put (dev->archdata.of_node); +of_node_put (dev->of_node);kfree (to_vio_dev (dev)); }
@@ -1230,7 +1230,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->unit_address = *unit_address; } viodev->dev.of_node =of_node_get (of_node); - viodev->dev.archdata.of_node = viodev->dev.of_node;/* temporary */ if (firmware_has_feature (FW_FEATURE_CMO ))vio_cmo_set_dma_ops (viodev);
@@ -1315,7 +1314,7 @@ static ssize_t name_show(struct device *dev,static ssize_t devspec_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct device_node *of_node = dev->archdata.of_node; +struct device_node *of_node = dev->of_node;return sprintf (buf,"%s\n" , of_node ? of_node->full_name :"none" ); }
@@ -1347,7 +1346,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)struct device_node *dn;const char *cp; - dn = dev->archdata.of_node; + dn = dev->of_node;if (!dn)return -ENODEV ; cp =of_get_property (dn,"compatible" ,NULL );
@@ -1378,7 +1377,7 @@ static struct bus_type vio_bus_type = {*/ const void *vio_get_attribute (struct vio_dev *vdev,char *which,int *length) { -return of_get_property (vdev->dev.archdata.of_node, which, length); +return of_get_property (vdev->dev.of_node, which, length); }EXPORT_SYMBOL (vio_get_attribute);
arch/powerpc/platforms/cell/iommu.c +2 -3
@@ -544,7 +544,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) {struct iommu_window *window;struct cbe_iommu *iommu; -struct dev_archdata *archdata = &dev->archdata;/* Current implementation uses the first window available in that * node's iommu. We -might- do something smarter later though it may
@@ -553,7 +552,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) iommu =cell_iommu_for_node (dev_to_node (dev));if (iommu =NULL ||list_empty (&iommu->windows)) {printk (KERN_ERR "iommu: missing iommu for %s (node %d)\n" , - archdata->of_node ? archdata->of_node->full_name :"?" , + dev->of_node ? dev->of_node->full_name :"?" ,dev_to_node (dev));return NULL ; }
@@ -896,7 +895,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)const u32 *ranges =NULL ;int i, len, best, naddr, nsize, pna, range_size; - np =of_node_get (dev->archdata.of_node); + np =of_node_get (dev->of_node);while (1 ) { naddr =of_n_addr_cells (np); nsize =of_n_size_cells (np);
arch/powerpc/platforms/pasemi/setup.c +2 -2
@@ -359,10 +359,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,/* We know electra_cf devices will always have of_node set, since * electra_cf is an of_platform driver. */ -if (!parent->archdata.of_node) +if (!parent->of_node)return 0 ; -if (!of_device_is_compatible (parent->archdata.of_node,"electra-cf" )) +if (!of_device_is_compatible (parent->of_node,"electra-cf" ))return 0 ;/* We use the direct ops for localbus */
arch/powerpc/platforms/ps3/system-bus.c +0 -1
@@ -766,7 +766,6 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) }; dev->core.of_node =NULL ; - dev->core.archdata.of_node =NULL ;/* temporary */ set_dev_node (&dev->core,0 );pr_debug ("%s:%d add %s\n" , __func__, __LINE__,dev_name (&dev->core));
arch/powerpc/platforms/pseries/iommu.c +1 -1
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)pr_debug ("pci_dma_dev_setup_pSeries: %s\n" ,pci_name (dev)); - dn = dev->dev.archdata.of_node; + dn = dev->dev.of_node;/* If we're the direct child of a root bus, then we need to allocate * an iommu table ourselves. The bus setup code should have setup
PATCH 35/37 arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/powerpc/include/asm/device.h | 16 ++++++++-------- arch/powerpc/include/asm/of_device.h | 1 - arch/powerpc/kernel/of_device.c | 4 +--- arch/powerpc/kernel/pci-common.c | 1 - arch/powerpc/kernel/vio.c | 17 ++++++++--------- arch/powerpc/platforms/cell/iommu.c | 5 ++--- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/ps3/system-bus.c | 1 - arch/powerpc/platforms/pseries/iommu.c | 2 +- 9 files changed, 22 insertions(+), 29 deletions(-)
arch/powerpc/include/asm/device.h +8 -8
@@ -10,8 +10,14 @@ struct dma_map_ops;struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; +/* +* struct device_node *of_node; +* This has been removed and moved into struct device proper. If +* this broke your code, then replace +* (struct device *)->archdata.of_node +* with +* (struct device *)->of_node +*/ /* DMA operations on that device */ struct dma_map_ops *dma_ops;
@@ -30,12 +36,6 @@ struct dev_archdata {#endif }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -struct pdev_archdata { };
arch/powerpc/include/asm/of_device.h +0 -1
@@ -12,7 +12,6 @@*/ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/powerpc/kernel/of_device.c +1 -3
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev,"%s" , bus_id);
arch/powerpc/kernel/pci-common.c +0 -1
@@ -1112,7 +1112,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)continue ;/* Setup OF node pointer in the device */ - sd->of_node =pci_device_to_OF_node (dev);/* temporary */ dev->dev.of_node =pci_device_to_OF_node (dev);/* Fixup NUMA node as it may not be setup yet by the generic
arch/powerpc/kernel/vio.c +8 -9
@@ -704,7 +704,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)* Check to see that device has a DMA window and configure * entitlement for the device. */ -if (of_get_property (viodev->dev.archdata.of_node, +if (of_get_property (viodev->dev.of_node,"ibm,my-dma-window" ,NULL )) {/* Check that the driver is CMO enabled and get desired DMA */ if (!viodrv->get_desired_dma) {
@@ -1048,7 +1048,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (firmware_has_feature (FW_FEATURE_ISERIES ))return vio_build_iommu_table_iseries (dev); - dma_window =of_get_property (dev->dev.archdata.of_node, + dma_window =of_get_property (dev->dev.of_node,"ibm,my-dma-window" ,NULL );if (!dma_window)return NULL ;
@@ -1057,7 +1057,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (tbl ==NULL )return NULL ; -of_parse_dma_window (dev->dev.archdata.of_node, dma_window, +of_parse_dma_window (dev->dev.of_node, dma_window, &tbl->it_index, &offset, &size);/* TCE table size - measured in tce entries */
@@ -1085,7 +1085,7 @@ static const struct vio_device_id *vio_match_device( {while (ids->type[0 ] !='\0' ) {if ((strncmp (dev->type, ids->type,strlen (ids->type)) ==0 ) && -of_device_is_compatible (dev->dev.archdata.of_node, +of_device_is_compatible (dev->dev.of_node, ids->compat))return ids; ids++;
@@ -1178,7 +1178,7 @@ EXPORT_SYMBOL(vio_unregister_driver);static void __devinit vio_dev_release (struct device *dev) {/* XXX should free TCE table */ -of_node_put (dev->archdata.of_node); +of_node_put (dev->of_node);kfree (to_vio_dev (dev)); }
@@ -1230,7 +1230,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->unit_address = *unit_address; } viodev->dev.of_node =of_node_get (of_node); - viodev->dev.archdata.of_node = viodev->dev.of_node;/* temporary */ if (firmware_has_feature (FW_FEATURE_CMO ))vio_cmo_set_dma_ops (viodev);
@@ -1315,7 +1314,7 @@ static ssize_t name_show(struct device *dev,static ssize_t devspec_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct device_node *of_node = dev->archdata.of_node; +struct device_node *of_node = dev->of_node;return sprintf (buf,"%s\n" , of_node ? of_node->full_name :"none" ); }
@@ -1347,7 +1346,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)struct device_node *dn;const char *cp; - dn = dev->archdata.of_node; + dn = dev->of_node;if (!dn)return -ENODEV ; cp =of_get_property (dn,"compatible" ,NULL );
@@ -1378,7 +1377,7 @@ static struct bus_type vio_bus_type = {*/ const void *vio_get_attribute (struct vio_dev *vdev,char *which,int *length) { -return of_get_property (vdev->dev.archdata.of_node, which, length); +return of_get_property (vdev->dev.of_node, which, length); }EXPORT_SYMBOL (vio_get_attribute);
arch/powerpc/platforms/cell/iommu.c +2 -3
@@ -544,7 +544,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) {struct iommu_window *window;struct cbe_iommu *iommu; -struct dev_archdata *archdata = &dev->archdata;/* Current implementation uses the first window available in that * node's iommu. We -might- do something smarter later though it may
@@ -553,7 +552,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) iommu =cell_iommu_for_node (dev_to_node (dev));if (iommu ==NULL ||list_empty (&iommu->windows)) {printk (KERN_ERR "iommu: missing iommu for %s (node %d)\n" , - archdata->of_node ? archdata->of_node->full_name :"?" , + dev->of_node ? dev->of_node->full_name :"?" ,dev_to_node (dev));return NULL ; }
@@ -896,7 +895,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)const u32 *ranges =NULL ;int i, len, best, naddr, nsize, pna, range_size; - np =of_node_get (dev->archdata.of_node); + np =of_node_get (dev->of_node);while (1 ) { naddr =of_n_addr_cells (np); nsize =of_n_size_cells (np);
arch/powerpc/platforms/pasemi/setup.c +2 -2
@@ -359,10 +359,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,/* We know electra_cf devices will always have of_node set, since * electra_cf is an of_platform driver. */ -if (!parent->archdata.of_node) +if (!parent->of_node)return 0 ; -if (!of_device_is_compatible (parent->archdata.of_node,"electra-cf" )) +if (!of_device_is_compatible (parent->of_node,"electra-cf" ))return 0 ;/* We use the direct ops for localbus */
arch/powerpc/platforms/ps3/system-bus.c +0 -1
@@ -766,7 +766,6 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) }; dev->core.of_node =NULL ; - dev->core.archdata.of_node =NULL ;/* temporary */ set_dev_node (&dev->core,0 );pr_debug ("%s:%d add %s\n" , __func__, __LINE__,dev_name (&dev->core));
arch/powerpc/platforms/pseries/iommu.c +1 -1
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)pr_debug ("pci_dma_dev_setup_pSeries: %s\n" ,pci_name (dev)); - dn = dev->dev.archdata.of_node; + dn = dev->dev.of_node;/* If we're the direct child of a root bus, then we need to allocate * an iommu table ourselves. The bus setup code should have setup
PATCH 35/37 arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/powerpc/include/asm/device.h | 16 ++++++++-------- arch/powerpc/include/asm/of_device.h | 1 - arch/powerpc/kernel/of_device.c | 4 +--- arch/powerpc/kernel/pci-common.c | 1 - arch/powerpc/kernel/vio.c | 17 ++++++++--------- arch/powerpc/platforms/cell/iommu.c | 5 ++--- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/ps3/system-bus.c | 1 - arch/powerpc/platforms/pseries/iommu.c | 2 +- 9 files changed, 22 insertions(+), 29 deletions(-)
arch/powerpc/include/asm/device.h +8 -8
@@ -10,8 +10,14 @@ struct dma_map_ops;struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; +/* +* struct device_node *of_node; +* This has been removed and moved into struct device proper. If +* this broke your code, then replace +* (struct device *)->archdata.of_node +* with +* (struct device *)->of_node +*/ /* DMA operations on that device */ struct dma_map_ops *dma_ops;
@@ -30,12 +36,6 @@ struct dev_archdata {#endif }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -struct pdev_archdata { };
arch/powerpc/include/asm/of_device.h +0 -1
@@ -12,7 +12,6 @@*/ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/powerpc/kernel/of_device.c +1 -3
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev,"%s" , bus_id);
arch/powerpc/kernel/pci-common.c +0 -1
@@ -1112,7 +1112,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)continue ;/* Setup OF node pointer in the device */ - sd->of_node =pci_device_to_OF_node (dev);/* temporary */ dev->dev.of_node =pci_device_to_OF_node (dev);/* Fixup NUMA node as it may not be setup yet by the generic
arch/powerpc/kernel/vio.c +8 -9
@@ -704,7 +704,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)* Check to see that device has a DMA window and configure * entitlement for the device. */ -if (of_get_property (viodev->dev.archdata.of_node, +if (of_get_property (viodev->dev.of_node,"ibm,my-dma-window" ,NULL )) {/* Check that the driver is CMO enabled and get desired DMA */ if (!viodrv->get_desired_dma) {
@@ -1048,7 +1048,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (firmware_has_feature (FW_FEATURE_ISERIES ))return vio_build_iommu_table_iseries (dev); - dma_window =of_get_property (dev->dev.archdata.of_node, + dma_window =of_get_property (dev->dev.of_node,"ibm,my-dma-window" ,NULL );if (!dma_window)return NULL ;
@@ -1057,7 +1057,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (tbl ==NULL )return NULL ; -of_parse_dma_window (dev->dev.archdata.of_node, dma_window, +of_parse_dma_window (dev->dev.of_node, dma_window, &tbl->it_index, &offset, &size);/* TCE table size - measured in tce entries */
@@ -1085,7 +1085,7 @@ static const struct vio_device_id *vio_match_device( {while (ids->type[0 ] !='\0' ) {if ((strncmp (dev->type, ids->type,strlen (ids->type)) ==0 ) && -of_device_is_compatible (dev->dev.archdata.of_node, +of_device_is_compatible (dev->dev.of_node, ids->compat))return ids; ids++;
@@ -1178,7 +1178,7 @@ EXPORT_SYMBOL(vio_unregister_driver);static void __devinit vio_dev_release (struct device *dev) {/* XXX should free TCE table */ -of_node_put (dev->archdata.of_node); +of_node_put (dev->of_node);kfree (to_vio_dev (dev)); }
@@ -1230,7 +1230,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->unit_address = *unit_address; } viodev->dev.of_node =of_node_get (of_node); - viodev->dev.archdata.of_node = viodev->dev.of_node;/* temporary */ if (firmware_has_feature (FW_FEATURE_CMO ))vio_cmo_set_dma_ops (viodev);
@@ -1315,7 +1314,7 @@ static ssize_t name_show(struct device *dev,static ssize_t devspec_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct device_node *of_node = dev->archdata.of_node; +struct device_node *of_node = dev->of_node;return sprintf (buf,"%s\n" , of_node ? of_node->full_name :"none" ); }
@@ -1347,7 +1346,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)struct device_node *dn;const char *cp; - dn = dev->archdata.of_node; + dn = dev->of_node;if (!dn)return -ENODEV ; cp =of_get_property (dn,"compatible" ,NULL );
@@ -1378,7 +1377,7 @@ static struct bus_type vio_bus_type = {*/ const void *vio_get_attribute (struct vio_dev *vdev,char *which,int *length) { -return of_get_property (vdev->dev.archdata.of_node, which, length); +return of_get_property (vdev->dev.of_node, which, length); }EXPORT_SYMBOL (vio_get_attribute);
arch/powerpc/platforms/cell/iommu.c +2 -3
@@ -544,7 +544,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) {struct iommu_window *window;struct cbe_iommu *iommu; -struct dev_archdata *archdata = &dev->archdata;/* Current implementation uses the first window available in that * node's iommu. We -might- do something smarter later though it may
@@ -553,7 +552,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) iommu =cell_iommu_for_node (dev_to_node (dev));if (iommu ==NULL ||list_empty (&iommu->windows)) {printk (KERN_ERR "iommu: missing iommu for %s (node %d)\n" , - archdata->of_node ? archdata->of_node->full_name :"?" , + dev->of_node ? dev->of_node->full_name :"?" ,dev_to_node (dev));return NULL ; }
@@ -896,7 +895,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)const u32 *ranges =NULL ;int i, len, best, naddr, nsize, pna, range_size; - np =of_node_get (dev->archdata.of_node); + np =of_node_get (dev->of_node);while (1 ) { naddr =of_n_addr_cells (np); nsize =of_n_size_cells (np);
arch/powerpc/platforms/pasemi/setup.c +2 -2
@@ -359,10 +359,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,/* We know electra_cf devices will always have of_node set, since * electra_cf is an of_platform driver. */ -if (!parent->archdata.of_node) +if (!parent->of_node)return 0 ; -if (!of_device_is_compatible (parent->archdata.of_node,"electra-cf" )) +if (!of_device_is_compatible (parent->of_node,"electra-cf" ))return 0 ;/* We use the direct ops for localbus */
arch/powerpc/platforms/ps3/system-bus.c +0 -1
@@ -766,7 +766,6 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) }; dev->core.of_node =NULL ; - dev->core.archdata.of_node =NULL ;/* temporary */ set_dev_node (&dev->core,0 );pr_debug ("%s:%d add %s\n" , __func__, __LINE__,dev_name (&dev->core));
arch/powerpc/platforms/pseries/iommu.c +1 -1
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)pr_debug ("pci_dma_dev_setup_pSeries: %s\n" ,pci_name (dev)); - dn = dev->dev.archdata.of_node; + dn = dev->dev.of_node;/* If we're the direct child of a root bus, then we need to allocate * an iommu table ourselves. The bus setup code should have setup
PATCH 35/37 arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/powerpc/include/asm/device.h | 16 ++++++++-------- arch/powerpc/include/asm/of_device.h | 1 - arch/powerpc/kernel/of_device.c | 4 +--- arch/powerpc/kernel/pci-common.c | 1 - arch/powerpc/kernel/vio.c | 17 ++++++++--------- arch/powerpc/platforms/cell/iommu.c | 5 ++--- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/ps3/system-bus.c | 1 - arch/powerpc/platforms/pseries/iommu.c | 2 +- 9 files changed, 22 insertions(+), 29 deletions(-)
arch/powerpc/include/asm/device.h +8 -8
@@ -10,8 +10,14 @@ struct dma_map_ops;struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; +/* +* struct device_node *of_node; +* This has been removed and moved into struct device proper. If +* this broke your code, then replace +* (struct device *)->archdata.of_node +* with +* (struct device *)->of_node +*/ /* DMA operations on that device */ struct dma_map_ops *dma_ops;
@@ -30,12 +36,6 @@ struct dev_archdata {#endif }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -struct pdev_archdata { };
arch/powerpc/include/asm/of_device.h +0 -1
@@ -12,7 +12,6 @@*/ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/powerpc/kernel/of_device.c +1 -3
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev,"%s" , bus_id);
arch/powerpc/kernel/pci-common.c +0 -1
@@ -1112,7 +1112,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)continue ;/* Setup OF node pointer in the device */ - sd->of_node =pci_device_to_OF_node (dev);/* temporary */ dev->dev.of_node =pci_device_to_OF_node (dev);/* Fixup NUMA node as it may not be setup yet by the generic
arch/powerpc/kernel/vio.c +8 -9
@@ -704,7 +704,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)* Check to see that device has a DMA window and configure * entitlement for the device. */ -if (of_get_property (viodev->dev.archdata.of_node, +if (of_get_property (viodev->dev.of_node,"ibm,my-dma-window" ,NULL )) {/* Check that the driver is CMO enabled and get desired DMA */ if (!viodrv->get_desired_dma) {
@@ -1048,7 +1048,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (firmware_has_feature (FW_FEATURE_ISERIES ))return vio_build_iommu_table_iseries (dev); - dma_window =of_get_property (dev->dev.archdata.of_node, + dma_window =of_get_property (dev->dev.of_node,"ibm,my-dma-window" ,NULL );if (!dma_window)return NULL ;
@@ -1057,7 +1057,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (tbl ==NULL )return NULL ; -of_parse_dma_window (dev->dev.archdata.of_node, dma_window, +of_parse_dma_window (dev->dev.of_node, dma_window, &tbl->it_index, &offset, &size);/* TCE table size - measured in tce entries */
@@ -1085,7 +1085,7 @@ static const struct vio_device_id *vio_match_device( {while (ids->type[0 ] !='\0' ) {if ((strncmp (dev->type, ids->type,strlen (ids->type)) ==0 ) && -of_device_is_compatible (dev->dev.archdata.of_node, +of_device_is_compatible (dev->dev.of_node, ids->compat))return ids; ids++;
@@ -1178,7 +1178,7 @@ EXPORT_SYMBOL(vio_unregister_driver);static void __devinit vio_dev_release (struct device *dev) {/* XXX should free TCE table */ -of_node_put (dev->archdata.of_node); +of_node_put (dev->of_node);kfree (to_vio_dev (dev)); }
@@ -1230,7 +1230,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->unit_address = *unit_address; } viodev->dev.of_node =of_node_get (of_node); - viodev->dev.archdata.of_node = viodev->dev.of_node;/* temporary */ if (firmware_has_feature (FW_FEATURE_CMO ))vio_cmo_set_dma_ops (viodev);
@@ -1315,7 +1314,7 @@ static ssize_t name_show(struct device *dev,static ssize_t devspec_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct device_node *of_node = dev->archdata.of_node; +struct device_node *of_node = dev->of_node;return sprintf (buf,"%s\n" , of_node ? of_node->full_name :"none" ); }
@@ -1347,7 +1346,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)struct device_node *dn;const char *cp; - dn = dev->archdata.of_node; + dn = dev->of_node;if (!dn)return -ENODEV ; cp =of_get_property (dn,"compatible" ,NULL );
@@ -1378,7 +1377,7 @@ static struct bus_type vio_bus_type = {*/ const void *vio_get_attribute (struct vio_dev *vdev,char *which,int *length) { -return of_get_property (vdev->dev.archdata.of_node, which, length); +return of_get_property (vdev->dev.of_node, which, length); }EXPORT_SYMBOL (vio_get_attribute);
arch/powerpc/platforms/cell/iommu.c +2 -3
@@ -544,7 +544,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) {struct iommu_window *window;struct cbe_iommu *iommu; -struct dev_archdata *archdata = &dev->archdata;/* Current implementation uses the first window available in that * node's iommu. We -might- do something smarter later though it may
@@ -553,7 +552,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) iommu =cell_iommu_for_node (dev_to_node (dev));if (iommu ==NULL ||list_empty (&iommu->windows)) {printk (KERN_ERR "iommu: missing iommu for %s (node %d)\n" , - archdata->of_node ? archdata->of_node->full_name :"?" , + dev->of_node ? dev->of_node->full_name :"?" ,dev_to_node (dev));return NULL ; }
@@ -896,7 +895,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)const u32 *ranges =NULL ;int i, len, best, naddr, nsize, pna, range_size; - np =of_node_get (dev->archdata.of_node); + np =of_node_get (dev->of_node);while (1 ) { naddr =of_n_addr_cells (np); nsize =of_n_size_cells (np);
arch/powerpc/platforms/pasemi/setup.c +2 -2
@@ -359,10 +359,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,/* We know electra_cf devices will always have of_node set, since * electra_cf is an of_platform driver. */ -if (!parent->archdata.of_node) +if (!parent->of_node)return 0 ; -if (!of_device_is_compatible (parent->archdata.of_node,"electra-cf" )) +if (!of_device_is_compatible (parent->of_node,"electra-cf" ))return 0 ;/* We use the direct ops for localbus */
arch/powerpc/platforms/ps3/system-bus.c +0 -1
@@ -766,7 +766,6 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) }; dev->core.of_node =NULL ; - dev->core.archdata.of_node =NULL ;/* temporary */ set_dev_node (&dev->core,0 );pr_debug ("%s:%d add %s\n" , __func__, __LINE__,dev_name (&dev->core));
arch/powerpc/platforms/pseries/iommu.c +1 -1
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)pr_debug ("pci_dma_dev_setup_pSeries: %s\n" ,pci_name (dev)); - dn = dev->dev.archdata.of_node; + dn = dev->dev.of_node;/* If we're the direct child of a root bus, then we need to allocate * an iommu table ourselves. The bus setup code should have setup
PATCH 35/37 arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/powerpc/include/asm/device.h | 16 ++++++++-------- arch/powerpc/include/asm/of_device.h | 1 - arch/powerpc/kernel/of_device.c | 4 +--- arch/powerpc/kernel/pci-common.c | 1 - arch/powerpc/kernel/vio.c | 17 ++++++++--------- arch/powerpc/platforms/cell/iommu.c | 5 ++--- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/ps3/system-bus.c | 1 - arch/powerpc/platforms/pseries/iommu.c | 2 +- 9 files changed, 22 insertions(+), 29 deletions(-)
arch/powerpc/include/asm/device.h +8 -8
@@ -10,8 +10,14 @@ struct dma_map_ops;struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; +/* +* struct device_node *of_node; +* This has been removed and moved into struct device proper. If +* this broke your code, then replace +* (struct device *)->archdata.of_node +* with +* (struct device *)->of_node +*/ /* DMA operations on that device */ struct dma_map_ops *dma_ops;
@@ -30,12 +36,6 @@ struct dev_archdata {#endif }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -struct pdev_archdata { };
arch/powerpc/include/asm/of_device.h +0 -1
@@ -12,7 +12,6 @@*/ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/powerpc/kernel/of_device.c +1 -3
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev,"%s" , bus_id);
arch/powerpc/kernel/pci-common.c +0 -1
@@ -1112,7 +1112,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)continue ;/* Setup OF node pointer in the device */ - sd->of_node =pci_device_to_OF_node (dev);/* temporary */ dev->dev.of_node =pci_device_to_OF_node (dev);/* Fixup NUMA node as it may not be setup yet by the generic
arch/powerpc/kernel/vio.c +8 -9
@@ -704,7 +704,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)* Check to see that device has a DMA window and configure * entitlement for the device. */ -if (of_get_property (viodev->dev.archdata.of_node, +if (of_get_property (viodev->dev.of_node,"ibm,my-dma-window" ,NULL )) {/* Check that the driver is CMO enabled and get desired DMA */ if (!viodrv->get_desired_dma) {
@@ -1048,7 +1048,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (firmware_has_feature (FW_FEATURE_ISERIES ))return vio_build_iommu_table_iseries (dev); - dma_window =of_get_property (dev->dev.archdata.of_node, + dma_window =of_get_property (dev->dev.of_node,"ibm,my-dma-window" ,NULL );if (!dma_window)return NULL ;
@@ -1057,7 +1057,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (tbl ==NULL )return NULL ; -of_parse_dma_window (dev->dev.archdata.of_node, dma_window, +of_parse_dma_window (dev->dev.of_node, dma_window, &tbl->it_index, &offset, &size);/* TCE table size - measured in tce entries */
@@ -1085,7 +1085,7 @@ static const struct vio_device_id *vio_match_device( {while (ids->type[0 ] !='\0' ) {if ((strncmp (dev->type, ids->type,strlen (ids->type)) ==0 ) && -of_device_is_compatible (dev->dev.archdata.of_node, +of_device_is_compatible (dev->dev.of_node, ids->compat))return ids; ids++;
@@ -1178,7 +1178,7 @@ EXPORT_SYMBOL(vio_unregister_driver);static void __devinit vio_dev_release (struct device *dev) {/* XXX should free TCE table */ -of_node_put (dev->archdata.of_node); +of_node_put (dev->of_node);kfree (to_vio_dev (dev)); }
@@ -1230,7 +1230,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->unit_address = *unit_address; } viodev->dev.of_node =of_node_get (of_node); - viodev->dev.archdata.of_node = viodev->dev.of_node;/* temporary */ if (firmware_has_feature (FW_FEATURE_CMO ))vio_cmo_set_dma_ops (viodev);
@@ -1315,7 +1314,7 @@ static ssize_t name_show(struct device *dev,static ssize_t devspec_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct device_node *of_node = dev->archdata.of_node; +struct device_node *of_node = dev->of_node;return sprintf (buf,"%s\n" , of_node ? of_node->full_name :"none" ); }
@@ -1347,7 +1346,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)struct device_node *dn;const char *cp; - dn = dev->archdata.of_node; + dn = dev->of_node;if (!dn)return -ENODEV ; cp =of_get_property (dn,"compatible" ,NULL );
@@ -1378,7 +1377,7 @@ static struct bus_type vio_bus_type = {*/ const void *vio_get_attribute (struct vio_dev *vdev,char *which,int *length) { -return of_get_property (vdev->dev.archdata.of_node, which, length); +return of_get_property (vdev->dev.of_node, which, length); }EXPORT_SYMBOL (vio_get_attribute);
arch/powerpc/platforms/cell/iommu.c +2 -3
@@ -544,7 +544,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) {struct iommu_window *window;struct cbe_iommu *iommu; -struct dev_archdata *archdata = &dev->archdata;/* Current implementation uses the first window available in that * node's iommu. We -might- do something smarter later though it may
@@ -553,7 +552,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) iommu =cell_iommu_for_node (dev_to_node (dev));if (iommu ==NULL ||list_empty (&iommu->windows)) {printk (KERN_ERR "iommu: missing iommu for %s (node %d)\n" , - archdata->of_node ? archdata->of_node->full_name :"?" , + dev->of_node ? dev->of_node->full_name :"?" ,dev_to_node (dev));return NULL ; }
@@ -896,7 +895,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)const u32 *ranges =NULL ;int i, len, best, naddr, nsize, pna, range_size; - np =of_node_get (dev->archdata.of_node); + np =of_node_get (dev->of_node);while (1 ) { naddr =of_n_addr_cells (np); nsize =of_n_size_cells (np);
arch/powerpc/platforms/pasemi/setup.c +2 -2
@@ -359,10 +359,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,/* We know electra_cf devices will always have of_node set, since * electra_cf is an of_platform driver. */ -if (!parent->archdata.of_node) +if (!parent->of_node)return 0 ; -if (!of_device_is_compatible (parent->archdata.of_node,"electra-cf" )) +if (!of_device_is_compatible (parent->of_node,"electra-cf" ))return 0 ;/* We use the direct ops for localbus */
arch/powerpc/platforms/ps3/system-bus.c +0 -1
@@ -766,7 +766,6 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) }; dev->core.of_node =NULL ; - dev->core.archdata.of_node =NULL ;/* temporary */ set_dev_node (&dev->core,0 );pr_debug ("%s:%d add %s\n" , __func__, __LINE__,dev_name (&dev->core));
arch/powerpc/platforms/pseries/iommu.c +1 -1
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)pr_debug ("pci_dma_dev_setup_pSeries: %s\n" ,pci_name (dev)); - dn = dev->dev.archdata.of_node; + dn = dev->dev.of_node;/* If we're the direct child of a root bus, then we need to allocate * an iommu table ourselves. The bus setup code should have setup
PATCH 35/37 arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/powerpc/include/asm/device.h | 16 ++++++++-------- arch/powerpc/include/asm/of_device.h | 1 - arch/powerpc/kernel/of_device.c | 4 +--- arch/powerpc/kernel/pci-common.c | 1 - arch/powerpc/kernel/vio.c | 17 ++++++++--------- arch/powerpc/platforms/cell/iommu.c | 5 ++--- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/ps3/system-bus.c | 1 - arch/powerpc/platforms/pseries/iommu.c | 2 +- 9 files changed, 22 insertions(+), 29 deletions(-)
arch/powerpc/include/asm/device.h +8 -8
@@ -10,8 +10,14 @@ struct dma_map_ops;struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; +/* +* struct device_node *of_node; +* This has been removed and moved into struct device proper. If +* this broke your code, then replace +* (struct device *)->archdata.of_node +* with +* (struct device *)->of_node +*/ /* DMA operations on that device */ struct dma_map_ops *dma_ops;
@@ -30,12 +36,6 @@ struct dev_archdata {#endif }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -struct pdev_archdata { };
arch/powerpc/include/asm/of_device.h +0 -1
@@ -12,7 +12,6 @@*/ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/powerpc/kernel/of_device.c +1 -3
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev,"%s" , bus_id);
arch/powerpc/kernel/pci-common.c +0 -1
@@ -1112,7 +1112,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)continue ;/* Setup OF node pointer in the device */ - sd->of_node =pci_device_to_OF_node (dev);/* temporary */ dev->dev.of_node =pci_device_to_OF_node (dev);/* Fixup NUMA node as it may not be setup yet by the generic
arch/powerpc/kernel/vio.c +8 -9
@@ -704,7 +704,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)* Check to see that device has a DMA window and configure * entitlement for the device. */ -if (of_get_property (viodev->dev.archdata.of_node, +if (of_get_property (viodev->dev.of_node,"ibm,my-dma-window" ,NULL )) {/* Check that the driver is CMO enabled and get desired DMA */ if (!viodrv->get_desired_dma) {
@@ -1048,7 +1048,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (firmware_has_feature (FW_FEATURE_ISERIES ))return vio_build_iommu_table_iseries (dev); - dma_window =of_get_property (dev->dev.archdata.of_node, + dma_window =of_get_property (dev->dev.of_node,"ibm,my-dma-window" ,NULL );if (!dma_window)return NULL ;
@@ -1057,7 +1057,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (tbl ==NULL )return NULL ; -of_parse_dma_window (dev->dev.archdata.of_node, dma_window, +of_parse_dma_window (dev->dev.of_node, dma_window, &tbl->it_index, &offset, &size);/* TCE table size - measured in tce entries */
@@ -1085,7 +1085,7 @@ static const struct vio_device_id *vio_match_device( {while (ids->type[0 ] !='\0' ) {if ((strncmp (dev->type, ids->type,strlen (ids->type)) ==0 ) && -of_device_is_compatible (dev->dev.archdata.of_node, +of_device_is_compatible (dev->dev.of_node, ids->compat))return ids; ids++;
@@ -1178,7 +1178,7 @@ EXPORT_SYMBOL(vio_unregister_driver);static void __devinit vio_dev_release (struct device *dev) {/* XXX should free TCE table */ -of_node_put (dev->archdata.of_node); +of_node_put (dev->of_node);kfree (to_vio_dev (dev)); }
@@ -1230,7 +1230,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->unit_address = *unit_address; } viodev->dev.of_node =of_node_get (of_node); - viodev->dev.archdata.of_node = viodev->dev.of_node;/* temporary */ if (firmware_has_feature (FW_FEATURE_CMO ))vio_cmo_set_dma_ops (viodev);
@@ -1315,7 +1314,7 @@ static ssize_t name_show(struct device *dev,static ssize_t devspec_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct device_node *of_node = dev->archdata.of_node; +struct device_node *of_node = dev->of_node;return sprintf (buf,"%s\n" , of_node ? of_node->full_name :"none" ); }
@@ -1347,7 +1346,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)struct device_node *dn;const char *cp; - dn = dev->archdata.of_node; + dn = dev->of_node;if (!dn)return -ENODEV ; cp =of_get_property (dn,"compatible" ,NULL );
@@ -1378,7 +1377,7 @@ static struct bus_type vio_bus_type = {*/ const void *vio_get_attribute (struct vio_dev *vdev,char *which,int *length) { -return of_get_property (vdev->dev.archdata.of_node, which, length); +return of_get_property (vdev->dev.of_node, which, length); }EXPORT_SYMBOL (vio_get_attribute);
arch/powerpc/platforms/cell/iommu.c +2 -3
@@ -544,7 +544,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) {struct iommu_window *window;struct cbe_iommu *iommu; -struct dev_archdata *archdata = &dev->archdata;/* Current implementation uses the first window available in that * node's iommu. We -might- do something smarter later though it may
@@ -553,7 +552,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) iommu =cell_iommu_for_node (dev_to_node (dev));if (iommu ==NULL ||list_empty (&iommu->windows)) {printk (KERN_ERR "iommu: missing iommu for %s (node %d)\n" , - archdata->of_node ? archdata->of_node->full_name :"?" , + dev->of_node ? dev->of_node->full_name :"?" ,dev_to_node (dev));return NULL ; }
@@ -896,7 +895,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)const u32 *ranges =NULL ;int i, len, best, naddr, nsize, pna, range_size; - np =of_node_get (dev->archdata.of_node); + np =of_node_get (dev->of_node);while (1 ) { naddr =of_n_addr_cells (np); nsize =of_n_size_cells (np);
arch/powerpc/platforms/pasemi/setup.c +2 -2
@@ -359,10 +359,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,/* We know electra_cf devices will always have of_node set, since * electra_cf is an of_platform driver. */ -if (!parent->archdata.of_node) +if (!parent->of_node)return 0 ; -if (!of_device_is_compatible (parent->archdata.of_node,"electra-cf" )) +if (!of_device_is_compatible (parent->of_node,"electra-cf" ))return 0 ;/* We use the direct ops for localbus */
arch/powerpc/platforms/ps3/system-bus.c +0 -1
@@ -766,7 +766,6 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) }; dev->core.of_node =NULL ; - dev->core.archdata.of_node =NULL ;/* temporary */ set_dev_node (&dev->core,0 );pr_debug ("%s:%d add %s\n" , __func__, __LINE__,dev_name (&dev->core));
arch/powerpc/platforms/pseries/iommu.c +1 -1
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)pr_debug ("pci_dma_dev_setup_pSeries: %s\n" ,pci_name (dev)); - dn = dev->dev.archdata.of_node; + dn = dev->dev.of_node;/* If we're the direct child of a root bus, then we need to allocate * an iommu table ourselves. The bus setup code should have setup
PATCH 35/37 arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/powerpc/include/asm/device.h | 16 ++++++++-------- arch/powerpc/include/asm/of_device.h | 1 - arch/powerpc/kernel/of_device.c | 4 +--- arch/powerpc/kernel/pci-common.c | 1 - arch/powerpc/kernel/vio.c | 17 ++++++++--------- arch/powerpc/platforms/cell/iommu.c | 5 ++--- arch/powerpc/platforms/pasemi/setup.c | 4 ++-- arch/powerpc/platforms/ps3/system-bus.c | 1 - arch/powerpc/platforms/pseries/iommu.c | 2 +- 9 files changed, 22 insertions(+), 29 deletions(-)
arch/powerpc/include/asm/device.h +8 -8
@@ -10,8 +10,14 @@ struct dma_map_ops;struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; +/* +* struct device_node *of_node; +* This has been removed and moved into struct device proper. If +* this broke your code, then replace +* (struct device *)->archdata.of_node +* with +* (struct device *)->of_node +*/ /* DMA operations on that device */ struct dma_map_ops *dma_ops;
@@ -30,12 +36,6 @@ struct dev_archdata {#endif }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -struct pdev_archdata { };
arch/powerpc/include/asm/of_device.h +0 -1
@@ -12,7 +12,6 @@*/ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/powerpc/kernel/of_device.c +1 -3
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev,"%s" , bus_id);
arch/powerpc/kernel/pci-common.c +0 -1
@@ -1112,7 +1112,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)continue ;/* Setup OF node pointer in the device */ - sd->of_node =pci_device_to_OF_node (dev);/* temporary */ dev->dev.of_node =pci_device_to_OF_node (dev);/* Fixup NUMA node as it may not be setup yet by the generic
arch/powerpc/kernel/vio.c +8 -9
@@ -704,7 +704,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)* Check to see that device has a DMA window and configure * entitlement for the device. */ -if (of_get_property (viodev->dev.archdata.of_node, +if (of_get_property (viodev->dev.of_node,"ibm,my-dma-window" ,NULL )) {/* Check that the driver is CMO enabled and get desired DMA */ if (!viodrv->get_desired_dma) {
@@ -1048,7 +1048,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (firmware_has_feature (FW_FEATURE_ISERIES ))return vio_build_iommu_table_iseries (dev); - dma_window =of_get_property (dev->dev.archdata.of_node, + dma_window =of_get_property (dev->dev.of_node,"ibm,my-dma-window" ,NULL );if (!dma_window)return NULL ;
@@ -1057,7 +1057,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)if (tbl ==NULL )return NULL ; -of_parse_dma_window (dev->dev.archdata.of_node, dma_window, +of_parse_dma_window (dev->dev.of_node, dma_window, &tbl->it_index, &offset, &size);/* TCE table size - measured in tce entries */
@@ -1085,7 +1085,7 @@ static const struct vio_device_id *vio_match_device( {while (ids->type[0 ] !='\0' ) {if ((strncmp (dev->type, ids->type,strlen (ids->type)) ==0 ) && -of_device_is_compatible (dev->dev.archdata.of_node, +of_device_is_compatible (dev->dev.of_node, ids->compat))return ids; ids++;
@@ -1178,7 +1178,7 @@ EXPORT_SYMBOL(vio_unregister_driver);static void __devinit vio_dev_release (struct device *dev) {/* XXX should free TCE table */ -of_node_put (dev->archdata.of_node); +of_node_put (dev->of_node);kfree (to_vio_dev (dev)); }
@@ -1230,7 +1230,6 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node) viodev->unit_address = *unit_address; } viodev->dev.of_node =of_node_get (of_node); - viodev->dev.archdata.of_node = viodev->dev.of_node;/* temporary */ if (firmware_has_feature (FW_FEATURE_CMO ))vio_cmo_set_dma_ops (viodev);
@@ -1315,7 +1314,7 @@ static ssize_t name_show(struct device *dev,static ssize_t devspec_show (struct device *dev,struct device_attribute *attr,char *buf) { -struct device_node *of_node = dev->archdata.of_node; +struct device_node *of_node = dev->of_node;return sprintf (buf,"%s\n" , of_node ? of_node->full_name :"none" ); }
@@ -1347,7 +1346,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)struct device_node *dn;const char *cp; - dn = dev->archdata.of_node; + dn = dev->of_node;if (!dn)return -ENODEV ; cp =of_get_property (dn,"compatible" ,NULL );
@@ -1378,7 +1377,7 @@ static struct bus_type vio_bus_type = {*/ const void *vio_get_attribute (struct vio_dev *vdev,char *which,int *length) { -return of_get_property (vdev->dev.archdata.of_node, which, length); +return of_get_property (vdev->dev.of_node, which, length); }EXPORT_SYMBOL (vio_get_attribute);
arch/powerpc/platforms/cell/iommu.c +2 -3
@@ -544,7 +544,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) {struct iommu_window *window;struct cbe_iommu *iommu; -struct dev_archdata *archdata = &dev->archdata;/* Current implementation uses the first window available in that * node's iommu. We -might- do something smarter later though it may
@@ -553,7 +552,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) iommu =cell_iommu_for_node (dev_to_node (dev));if (iommu ==NULL ||list_empty (&iommu->windows)) {printk (KERN_ERR "iommu: missing iommu for %s (node %d)\n" , - archdata->of_node ? archdata->of_node->full_name :"?" , + dev->of_node ? dev->of_node->full_name :"?" ,dev_to_node (dev));return NULL ; }
@@ -896,7 +895,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)const u32 *ranges =NULL ;int i, len, best, naddr, nsize, pna, range_size; - np =of_node_get (dev->archdata.of_node); + np =of_node_get (dev->of_node);while (1 ) { naddr =of_n_addr_cells (np); nsize =of_n_size_cells (np);
arch/powerpc/platforms/pasemi/setup.c +2 -2
@@ -359,10 +359,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,/* We know electra_cf devices will always have of_node set, since * electra_cf is an of_platform driver. */ -if (!parent->archdata.of_node) +if (!parent->of_node)return 0 ; -if (!of_device_is_compatible (parent->archdata.of_node,"electra-cf" )) +if (!of_device_is_compatible (parent->of_node,"electra-cf" ))return 0 ;/* We use the direct ops for localbus */
arch/powerpc/platforms/ps3/system-bus.c +0 -1
@@ -766,7 +766,6 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev) }; dev->core.of_node =NULL ; - dev->core.archdata.of_node =NULL ;/* temporary */ set_dev_node (&dev->core,0 );pr_debug ("%s:%d add %s\n" , __func__, __LINE__,dev_name (&dev->core));
arch/powerpc/platforms/pseries/iommu.c +1 -1
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)pr_debug ("pci_dma_dev_setup_pSeries: %s\n" ,pci_name (dev)); - dn = dev->dev.archdata.of_node; + dn = dev->dev.of_node;/* If we're the direct child of a root bus, then we need to allocate * an iommu table ourselves. The bus setup code should have setup
PATCH 36/37 arch/microblaze: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/microblaze/include/asm/device.h | 8 -------- arch/microblaze/include/asm/of_device.h | 1 - arch/microblaze/kernel/of_device.c | 4 +--- 3 files changed, 1 insertions(+), 12 deletions(-)
arch/microblaze/include/asm/device.h +0 -8
@@ -12,19 +12,11 @@struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; };struct pdev_archdata { }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -#endif /* _ASM_MICROBLAZE_DEVICE_H */
arch/microblaze/include/asm/of_device.h +0 -1
@@ -21,7 +21,6 @@* probed using OF properties. */ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/microblaze/kernel/of_device.c +1 -3
@@ -49,12 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev, bus_id);
PATCH 36/37 arch/microblaze: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/microblaze/include/asm/device.h | 8 -------- arch/microblaze/include/asm/of_device.h | 1 - arch/microblaze/kernel/of_device.c | 4 +--- 3 files changed, 1 insertions(+), 12 deletions(-)
arch/microblaze/include/asm/device.h +0 -8
@@ -12,19 +12,11 @@struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; };struct pdev_archdata { }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -#endif /* _ASM_MICROBLAZE_DEVICE_H */
arch/microblaze/include/asm/of_device.h +0 -1
@@ -21,7 +21,6 @@* probed using OF properties. */ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/microblaze/kernel/of_device.c +1 -3
@@ -49,12 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev, bus_id);
PATCH 36/37 arch/microblaze: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/microblaze/include/asm/device.h | 8 -------- arch/microblaze/include/asm/of_device.h | 1 - arch/microblaze/kernel/of_device.c | 4 +--- 3 files changed, 1 insertions(+), 12 deletions(-)
arch/microblaze/include/asm/device.h +0 -8
@@ -12,19 +12,11 @@struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; };struct pdev_archdata { }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -#endif /* _ASM_MICROBLAZE_DEVICE_H */
arch/microblaze/include/asm/of_device.h +0 -1
@@ -21,7 +21,6 @@* probed using OF properties. */ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/microblaze/kernel/of_device.c +1 -3
@@ -49,12 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev, bus_id);
PATCH 36/37 arch/microblaze: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/microblaze/include/asm/device.h | 8 -------- arch/microblaze/include/asm/of_device.h | 1 - arch/microblaze/kernel/of_device.c | 4 +--- 3 files changed, 1 insertions(+), 12 deletions(-)
arch/microblaze/include/asm/device.h +0 -8
@@ -12,19 +12,11 @@struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; };struct pdev_archdata { }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -#endif /* _ASM_MICROBLAZE_DEVICE_H */
arch/microblaze/include/asm/of_device.h +0 -1
@@ -21,7 +21,6 @@* probed using OF properties. */ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/microblaze/kernel/of_device.c +1 -3
@@ -49,12 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev, bus_id);
PATCH 36/37 arch/microblaze: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/microblaze/include/asm/device.h | 8 -------- arch/microblaze/include/asm/of_device.h | 1 - arch/microblaze/kernel/of_device.c | 4 +--- 3 files changed, 1 insertions(+), 12 deletions(-)
arch/microblaze/include/asm/device.h +0 -8
@@ -12,19 +12,11 @@struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; };struct pdev_archdata { }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -#endif /* _ASM_MICROBLAZE_DEVICE_H */
arch/microblaze/include/asm/of_device.h +0 -1
@@ -21,7 +21,6 @@* probed using OF properties. */ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/microblaze/kernel/of_device.c +1 -3
@@ -49,12 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev, bus_id);
PATCH 37/37 arch/sparc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/sparc/include/asm/device.h | 9 --------- arch/sparc/include/asm/of_device.h | 1 - arch/sparc/kernel/of_device_32.c | 3 --- arch/sparc/kernel/of_device_64.c | 2 -- arch/sparc/kernel/pci.c | 1 - 5 files changed, 0 insertions(+), 16 deletions(-)
arch/sparc/include/asm/device.h +0 -9
@@ -13,19 +13,10 @@ struct dev_archdata {void *iommu;void *stc;void *host_controller; - -struct device_node *prom_node;struct of_device *op; -int numa_node; }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->prom_node = np; -} -struct pdev_archdata { };
arch/sparc/include/asm/of_device.h +0 -1
@@ -14,7 +14,6 @@*/ struct of_device { -struct device_node *node;struct device dev;struct resource resource[PROMREG_MAX ];unsigned int irqs[PROMINTR_MAX ];
arch/sparc/kernel/of_device_32.c +0 -3
@@ -345,12 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; - op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 )); op->portid =of_getintprop_default (dp,"upa-portid" ,-1 );
arch/sparc/kernel/of_device_64.c +0 -2
@@ -640,11 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 ));
arch/sparc/kernel/pci.c +0 -1
@@ -261,7 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, sd->iommu = pbm->iommu; sd->stc = &pbm->stc; sd->host_controller = pbm; - sd->prom_node = node;/* temporary */ sd->op = op =of_find_device_by_node (node); sd->numa_node = pbm->numa_node;
PATCH 37/37 arch/sparc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/sparc/include/asm/device.h | 9 --------- arch/sparc/include/asm/of_device.h | 1 - arch/sparc/kernel/of_device_32.c | 3 --- arch/sparc/kernel/of_device_64.c | 2 -- arch/sparc/kernel/pci.c | 1 - 5 files changed, 0 insertions(+), 16 deletions(-)
arch/sparc/include/asm/device.h +0 -9
@@ -13,19 +13,10 @@ struct dev_archdata {void *iommu;void *stc;void *host_controller; - -struct device_node *prom_node;struct of_device *op; -int numa_node; }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->prom_node = np; -} -struct pdev_archdata { };
arch/sparc/include/asm/of_device.h +0 -1
@@ -14,7 +14,6 @@*/ struct of_device { -struct device_node *node;struct device dev;struct resource resource[PROMREG_MAX ];unsigned int irqs[PROMINTR_MAX ];
arch/sparc/kernel/of_device_32.c +0 -3
@@ -345,12 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; - op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 )); op->portid =of_getintprop_default (dp,"upa-portid" ,-1 );
arch/sparc/kernel/of_device_64.c +0 -2
@@ -640,11 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 ));
arch/sparc/kernel/pci.c +0 -1
@@ -261,7 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, sd->iommu = pbm->iommu; sd->stc = &pbm->stc; sd->host_controller = pbm; - sd->prom_node = node;/* temporary */ sd->op = op =of_find_device_by_node (node); sd->numa_node = pbm->numa_node;
PATCH 36/37 arch/microblaze: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/microblaze/include/asm/device.h | 8 -------- arch/microblaze/include/asm/of_device.h | 1 - arch/microblaze/kernel/of_device.c | 4 +--- 3 files changed, 1 insertions(+), 12 deletions(-)
arch/microblaze/include/asm/device.h +0 -8
@@ -12,19 +12,11 @@struct device_node ;struct dev_archdata { -/* Optional pointer to an OF device node */ -struct device_node *of_node; };struct pdev_archdata { }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->of_node = np; -} -#endif /* _ASM_MICROBLAZE_DEVICE_H */
arch/microblaze/include/asm/of_device.h +0 -1
@@ -21,7 +21,6 @@* probed using OF properties. */ struct of_device { -struct device_node *node;/* to be obsoleted */ u64 dma_mask;/* DMA mask */ struct device dev;/* Generic device interface */ };
arch/microblaze/kernel/of_device.c +1 -3
@@ -49,12 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,if (!dev)return NULL ; - dev->node =of_node_get (np); + dev->dev.of_node =of_node_get (np); dev->dev.dma_mask = &dev->dma_mask; dev->dev.parent = parent; dev->dev.release = of_release_dev; - dev->dev.archdata.of_node = np;/* temporary; remove after merging */ - dev->dev.of_node = np;if (bus_id)dev_set_name (&dev->dev, bus_id);
PATCH 37/37 arch/sparc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/sparc/include/asm/device.h | 9 --------- arch/sparc/include/asm/of_device.h | 1 - arch/sparc/kernel/of_device_32.c | 3 --- arch/sparc/kernel/of_device_64.c | 2 -- arch/sparc/kernel/pci.c | 1 - 5 files changed, 0 insertions(+), 16 deletions(-)
arch/sparc/include/asm/device.h +0 -9
@@ -13,19 +13,10 @@ struct dev_archdata {void *iommu;void *stc;void *host_controller; - -struct device_node *prom_node;struct of_device *op; -int numa_node; }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->prom_node = np; -} -struct pdev_archdata { };
arch/sparc/include/asm/of_device.h +0 -1
@@ -14,7 +14,6 @@*/ struct of_device { -struct device_node *node;struct device dev;struct resource resource[PROMREG_MAX ];unsigned int irqs[PROMINTR_MAX ];
arch/sparc/kernel/of_device_32.c +0 -3
@@ -345,12 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; - op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 )); op->portid =of_getintprop_default (dp,"upa-portid" ,-1 );
arch/sparc/kernel/of_device_64.c +0 -2
@@ -640,11 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 ));
arch/sparc/kernel/pci.c +0 -1
@@ -261,7 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, sd->iommu = pbm->iommu; sd->stc = &pbm->stc; sd->host_controller = pbm; - sd->prom_node = node;/* temporary */ sd->op = op =of_find_device_by_node (node); sd->numa_node = pbm->numa_node;
PATCH 37/37 arch/sparc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/sparc/include/asm/device.h | 9 --------- arch/sparc/include/asm/of_device.h | 1 - arch/sparc/kernel/of_device_32.c | 3 --- arch/sparc/kernel/of_device_64.c | 2 -- arch/sparc/kernel/pci.c | 1 - 5 files changed, 0 insertions(+), 16 deletions(-)
arch/sparc/include/asm/device.h +0 -9
@@ -13,19 +13,10 @@ struct dev_archdata {void *iommu;void *stc;void *host_controller; - -struct device_node *prom_node;struct of_device *op; -int numa_node; }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->prom_node = np; -} -struct pdev_archdata { };
arch/sparc/include/asm/of_device.h +0 -1
@@ -14,7 +14,6 @@*/ struct of_device { -struct device_node *node;struct device dev;struct resource resource[PROMREG_MAX ];unsigned int irqs[PROMINTR_MAX ];
arch/sparc/kernel/of_device_32.c +0 -3
@@ -345,12 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; - op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 )); op->portid =of_getintprop_default (dp,"upa-portid" ,-1 );
arch/sparc/kernel/of_device_64.c +0 -2
@@ -640,11 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 ));
arch/sparc/kernel/pci.c +0 -1
@@ -261,7 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, sd->iommu = pbm->iommu; sd->stc = &pbm->stc; sd->host_controller = pbm; - sd->prom_node = node;/* temporary */ sd->op = op =of_find_device_by_node (node); sd->numa_node = pbm->numa_node;
PATCH 37/37 arch/sparc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/sparc/include/asm/device.h | 9 --------- arch/sparc/include/asm/of_device.h | 1 - arch/sparc/kernel/of_device_32.c | 3 --- arch/sparc/kernel/of_device_64.c | 2 -- arch/sparc/kernel/pci.c | 1 - 5 files changed, 0 insertions(+), 16 deletions(-)
arch/sparc/include/asm/device.h +0 -9
@@ -13,19 +13,10 @@ struct dev_archdata {void *iommu;void *stc;void *host_controller; - -struct device_node *prom_node;struct of_device *op; -int numa_node; }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->prom_node = np; -} -struct pdev_archdata { };
arch/sparc/include/asm/of_device.h +0 -1
@@ -14,7 +14,6 @@*/ struct of_device { -struct device_node *node;struct device dev;struct resource resource[PROMREG_MAX ];unsigned int irqs[PROMINTR_MAX ];
arch/sparc/kernel/of_device_32.c +0 -3
@@ -345,12 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; - op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 )); op->portid =of_getintprop_default (dp,"upa-portid" ,-1 );
arch/sparc/kernel/of_device_64.c +0 -2
@@ -640,11 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 ));
arch/sparc/kernel/pci.c +0 -1
@@ -261,7 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, sd->iommu = pbm->iommu; sd->stc = &pbm->stc; sd->host_controller = pbm; - sd->prom_node = node;/* temporary */ sd->op = op =of_find_device_by_node (node); sd->numa_node = pbm->numa_node;
PATCH 37/37 arch/sparc: Remove .archdata.of_node and use .of_node in struct device
In reply to Grant Likely.archdata.of_node is being removed from Microblaze, SPARC and PowerPC because it duplicates the struct device .of_node pointer. This patch also removes .node from struct of_device for the same reason.
---
arch/sparc/include/asm/device.h | 9 --------- arch/sparc/include/asm/of_device.h | 1 - arch/sparc/kernel/of_device_32.c | 3 --- arch/sparc/kernel/of_device_64.c | 2 -- arch/sparc/kernel/pci.c | 1 - 5 files changed, 0 insertions(+), 16 deletions(-)
arch/sparc/include/asm/device.h +0 -9
@@ -13,19 +13,10 @@ struct dev_archdata {void *iommu;void *stc;void *host_controller; - -struct device_node *prom_node;struct of_device *op; -int numa_node; }; -static inline void dev_archdata_set_node (struct dev_archdata *ad, -struct device_node *np) -{ - ad->prom_node = np; -} -struct pdev_archdata { };
arch/sparc/include/asm/of_device.h +0 -1
@@ -14,7 +14,6 @@*/ struct of_device { -struct device_node *node;struct device dev;struct resource resource[PROMREG_MAX ];unsigned int irqs[PROMINTR_MAX ];
arch/sparc/kernel/of_device_32.c +0 -3
@@ -345,12 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; - op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 )); op->portid =of_getintprop_default (dp,"upa-portid" ,-1 );
arch/sparc/kernel/of_device_64.c +0 -2
@@ -640,11 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp;/* temporary */ sd->op = op; op->dev.of_node = dp; - op->node = dp; op->clock_freq =of_getintprop_default (dp,"clock-frequency" , (25 *1000 *1000 ));
arch/sparc/kernel/pci.c +0 -1
@@ -261,7 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, sd->iommu = pbm->iommu; sd->stc = &pbm->stc; sd->host_controller = pbm; - sd->prom_node = node;/* temporary */ sd->op = op =of_find_device_by_node (node); sd->numa_node = pbm->numa_node;
David Miller
maintainerFrom: Grant Likely <[email protected]>
Date: Thu, 11 Mar 2010 11:03:47 -0700
Quoted 7 lines
Currently on OF enabled platforms, the device node pointer is stored in both device.archdata.of_node (.prom_node on sparc), and in of_device.node OF device tree support is being generalized to work on any platform, so instead of adding the
of_nodepointer to each platform's archdata individually, this patch series moves theof_nodepointer into struct device proper and fixes up all users to reference the new location.
Quoted 7 lines
The last 3 patches in this series remove the old .archdata.of_node, .archdata.prom_node and of_device.node instances.
This series has been compile tested on powerpc, sparc and microblaze, (allmodconfig used on sparc and powerpc) and boot tested on an mpc5200 powerpc. All known (or at least all I could find) in-tree users of the old names have been removed.
Three or four of the patches don't apply because only your tree has those "/* temporary */" comments, f.e. in arch/sparc/kernel/pci.c
I took care of this when applying to my tree.
Quoted 8 lines
This series should also be fully bisectable. After I collect acks, I would like to get this whole series into linux-next to see if I've missed any references, but I can probably hold off merging the last three patches when the 2.6.35 merge window opens to give out of tree users a bit more time to adapt. In fact, I'd probably wait a few extra days after pushing out the bulk of this series before I push the last 3 patches into my linux-next branch to isolate the drivers that I missed while fixing.
I'd rather you just apply the sparc one immediately in 2.6.35 and not wait at all.
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Thu, 11 Mar 2010 10:20:43 -0800 (PST)
Quoted 4 lines
Three or four of the patches don't apply because only your tree has those "/* temporary */" comments, f.e. in
arch/sparc/kernel/pci.cI took care of this when applying to my tree.
It also doesn't build, what the heck is this against Grant?
drivers/of/device.c: In function 'of_match_device':drivers/of/device.c:24: error: 'const struct device' has no member named 'of_node' drivers/of/device.c:26: error: 'const struct device' has no member named 'of_node'
Please make a patch set against Linus's vanilla tree so I and others can test this.
Quoted 11 lines · David Miller
From: David Miller <[email protected]>
Date: Thu, 11 Mar 2010 10:20:43 -0800 (PST)Quoted 4 lines
Three or four of the patches don't apply because only your tree has those "/* temporary */" comments, f.e. in
arch/sparc/kernel/pci.cI took care of this when applying to my tree.
It also doesn't build, what the heck is this against Grant?
Quoted 6 lines
drivers/of/device.c: In function 'of_match_device':drivers/of/device.c:24: error: 'const struct device' has no member named 'of_node'drivers/of/device.c:26: error: 'const struct device' has no member named 'of_node'Please make a patch set against Linus's vanilla tree so I and others can test this.
Oops, sorry David, I accidentally dropped the top patch. Give me a moment and I'll send it out.
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
David Miller
maintainerFrom: Grant Likely <[email protected]>
Date: Thu, 11 Mar 2010 11:25:46 -0700
Quoted 2 lines
Oops, sorry David, I accidentally dropped the top patch. Give me a moment and I'll send it out.
Sorry, now that you've just bombed us with 27 patches to the same area, I've totally lost interest in testing this work.