Skip to content

Commit

Permalink
powerpc: Fix fallout from device_node->name constification
Browse files Browse the repository at this point in the history
Commit c22618a, "drivers/of: Constify device_node->name and
->path_component_name" changes device_node name to a const value, but
the PowerPC scom code still assigns it to a non-void field in
debugfs_blob_wrapper. The /right/ solution might be to change the
debugfs_blob_wrapper->data to also be const, but that is a bit
risky. Instead, cast the value to (void*). It is a bit ugly, but it
is the safest change until it can be investigated where
debugfs_blob_wrapper can be modified.

Reported-by: Michael Neuling <mikey@neuling.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Grant Likely committed Nov 29, 2012
1 parent b8fbdc4 commit 499b42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/sysdev/scom.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static int scom_debug_init_one(struct dentry *root, struct device_node *dn,
ent->map = SCOM_MAP_INVALID;
spin_lock_init(&ent->lock);
snprintf(ent->name, 8, "scom%d", i);
ent->blob.data = dn->full_name;
ent->blob.data = (void*) dn->full_name;
ent->blob.size = strlen(dn->full_name);

dir = debugfs_create_dir(ent->name, root);
Expand Down

0 comments on commit 499b42c

Please sign in to comment.