Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336554
b: refs/heads/master
c: c22618a
h: refs/heads/master
v: v3
  • Loading branch information
Grant Likely committed Nov 17, 2012
1 parent 5194800 commit bc5c29e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31982e52f0f5d6d51e69d5c4c4a7be5d52307c6e
refs/heads/master: c22618a11d1ba2966bd2cfd5e4918ed4f2dad13e
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/powermac/pfunc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ static int pmf_add_functions(struct pmf_device *dev, void *driverdata)
int count = 0;

for (pp = dev->node->properties; pp != 0; pp = pp->next) {
char *name;
const char *name;
if (strncmp(pp->name, PP_PREFIX, plen) != 0)
continue;
name = pp->name + plen;
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/pseries/reconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,11 @@ static struct property *new_property(const char *name, const int length,
if (!new)
return NULL;

if (!(new->name = kmalloc(strlen(name) + 1, GFP_KERNEL)))
if (!(new->name = kstrdup(name, GFP_KERNEL)))
goto cleanup;
if (!(new->value = kmalloc(length + 1, GFP_KERNEL)))
goto cleanup;

strcpy(new->name, name);
memcpy(new->value, value, length);
*(((char *)new->value) + length) = 0;
new->length = length;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/sysdev/fsl_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static void __init setup_pci_atmu(struct pci_controller *hose,
u32 pcicsrbar = 0, pcicsrbar_sz;
u32 piwar = PIWAR_EN | PIWAR_PF | PIWAR_TGI_LOCAL |
PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP;
char *name = hose->dn->full_name;
const char *name = hose->dn->full_name;
const u64 *reg;
int len;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/pci_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct pci_pbm_info {
int chip_revision;

/* Name used for top-level resources. */
char *name;
const char *name;

/* OBP specific information. */
struct platform_device *op;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
np = unflatten_dt_alloc(&mem, sizeof(struct device_node) + allocl,
__alignof__(struct device_node));
if (allnextpp) {
char *fn;
memset(np, 0, sizeof(*np));
np->full_name = ((char *)np) + sizeof(struct device_node);
np->full_name = fn = ((char *)np) + sizeof(*np);
if (new_format) {
char *fn = np->full_name;
/* rebuild full path for new format */
if (dad && dad->parent) {
strcpy(fn, dad->full_name);
Expand All @@ -216,9 +216,9 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
fn += strlen(fn);
}
*(fn++) = '/';
memcpy(fn, pathp, l);
} else
memcpy(np->full_name, pathp, l);
}
memcpy(fn, pathp, l);

prev_pp = &np->properties;
**allnextpp = np;
*allnextpp = &np->allnext;
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct device_node {
const char *name;
const char *type;
phandle phandle;
char *full_name;
const char *full_name;

struct property *properties;
struct property *deadprops; /* removed properties */
Expand All @@ -60,7 +60,7 @@ struct device_node {
unsigned long _flags;
void *data;
#if defined(CONFIG_SPARC)
char *path_component_name;
const char *path_component_name;
unsigned int unique_id;
struct of_irq_controller *irq_trans;
#endif
Expand Down

0 comments on commit bc5c29e

Please sign in to comment.