Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55012
b: refs/heads/master
c: 40cd3a4
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Rothwell authored and Paul Mackerras committed May 2, 2007
1 parent f196e9e commit 288c29a
Show file tree
Hide file tree
Showing 34 changed files with 88 additions and 86 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: 9f9a3b8a06b7965335bfe5162c1a50e4d9c3859b
refs/heads/master: 40cd3a4564ed6b7bc0279430120ca0e9b83cf486
2 changes: 1 addition & 1 deletion trunk/drivers/ata/sata_svw.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
/* Match it to a port node */
index = (ap == ap->host->ports[0]) ? 0 : 1;
for (np = np->child; np != NULL; np = np->sibling) {
const u32 *reg = get_property(np, "reg", NULL);
const u32 *reg = of_get_property(np, "reg", NULL);
if (!reg)
continue;
if (index == *reg)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/agp/uninorth-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ static int __devinit agp_uninorth_probe(struct pci_dev *pdev,
uninorth_node = of_find_node_by_name(NULL, "u3");
}
if (uninorth_node) {
const int *revprop = get_property(uninorth_node,
const int *revprop = of_get_property(uninorth_node,
"device-rev", NULL);
if (revprop != NULL)
uninorth_rev = *revprop & 0x3f;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/briq_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static int __init briq_panel_init(void)
const char *machine;
int i;

machine = get_property(root, "model", NULL);
machine = of_get_property(root, "model", NULL);
if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0) {
of_node_put(root);
return -ENODEV;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/tpm/tpm_atmel.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static void __iomem * atmel_get_base_addr(unsigned long *base, int *region_size)
return NULL;
}

reg = get_property(dn, "reg", &reglen);
reg = of_get_property(dn, "reg", &reglen);
naddrc = of_n_addr_cells(dn);
nsizec = of_n_size_cells(dn);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/hwmon/ams/ams-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ int ams_sensor_attach(void)
const u32 *prop;

/* Get orientation */
prop = get_property(ams_info.of_node, "orientation", NULL);
prop = of_get_property(ams_info.of_node, "orientation", NULL);
if (!prop)
return -ENODEV;
ams_info.orient1 = *prop;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/hwmon/ams/ams-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ int __init ams_i2c_init(struct device_node *np)
ams_info.bustype = BUS_I2C;

/* look for bus either using "reg" or by path */
prop = get_property(ams_info.of_node, "reg", NULL);
prop = of_get_property(ams_info.of_node, "reg", NULL);
if (!prop) {
result = -ENODEV;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/hwmon/ams/ams-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int __init ams_pmu_init(struct device_node *np)
ams_info.bustype = BUS_HOST;

/* Get PMU command, should be 0x4e, but we can never know */
prop = get_property(ams_info.of_node, "reg", NULL);
prop = of_get_property(ams_info.of_node, "reg", NULL);
if (!prop) {
result = -ENODEV;
goto exit;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/ide/ppc/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,14 +1175,14 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
pmif->broken_dma = 1;
}

bidp = get_property(np, "AAPL,bus-id", NULL);
bidp = of_get_property(np, "AAPL,bus-id", NULL);
pmif->aapl_bus_id = bidp ? *bidp : 0;

/* Get cable type from device-tree */
if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6
|| pmif->kind == controller_k2_ata6
|| pmif->kind == controller_sh_ata6) {
const char* cable = get_property(np, "cable-type", NULL);
const char* cable = of_get_property(np, "cable-type", NULL);
if (cable && !strncmp(cable, "80-", 3))
pmif->cable_80 = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/hw/ehca/ehca_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ static int __devinit ehca_probe(struct ibmebus_dev *dev,
struct ib_pd *ibpd;
int ret;

handle = get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
if (!handle) {
ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
dev->ofdev.node->full_name);
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/mtd/maps/physmap_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static int parse_flash_partitions(struct device_node *node,
const u32 *part;
const char *name;

part = get_property(node, "partitions", &plen);
part = of_get_property(node, "partitions", &plen);
if (part == NULL)
goto err;

Expand All @@ -59,7 +59,7 @@ static int parse_flash_partitions(struct device_node *node,
goto err;
}

name = get_property(node, "partition-names", &plen);
name = of_get_property(node, "partition-names", &plen);

for (i = 0; i < retval; i++) {
(*parts)[i].offset = *part++;
Expand Down Expand Up @@ -153,7 +153,7 @@ static int __devinit of_physmap_probe(struct of_device *dev, const struct of_dev
goto err_out;
}

width = get_property(dp, "bank-width", NULL);
width = of_get_property(dp, "bank-width", NULL);
if (width == NULL) {
dev_err(&dev->dev, "Can't get the flash bank width!\n");
err = -EINVAL;
Expand All @@ -174,7 +174,7 @@ static int __devinit of_physmap_probe(struct of_device *dev, const struct of_dev

simple_map_init(&info->map);

of_probe = get_property(dp, "probe-type", NULL);
of_probe = of_get_property(dp, "probe-type", NULL);
if (of_probe == NULL) {
probe_type = rom_probe_types;
for (; info->mtd == NULL && *probe_type != NULL; probe_type++)
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,10 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n");
return -ENODEV;
}
prop_addr = get_property(macio_get_of_node(mdev), "mac-address", NULL);
prop_addr = of_get_property(macio_get_of_node(mdev),
"mac-address", NULL);
if (prop_addr == NULL) {
prop_addr = get_property(macio_get_of_node(mdev),
prop_addr = of_get_property(macio_get_of_node(mdev),
"local-mac-address", NULL);
if (prop_addr == NULL) {
printk(KERN_ERR "BMAC: Can't get mac-address\n");
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2609,7 +2609,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter)
lhea_dn = adapter->ebus_dev->ofdev.node;
while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {

dn_log_port_id = get_property(eth_dn, "ibm,hea-port-no",
dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
NULL);
if (!dn_log_port_id) {
ehea_error("bad device node: eth_dn name=%s",
Expand Down Expand Up @@ -2649,7 +2649,7 @@ static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter,
lhea_dn = adapter->ebus_dev->ofdev.node;
while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {

dn_log_port_id = get_property(eth_dn, "ibm,hea-port-no",
dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
NULL);
if (dn_log_port_id)
if (*dn_log_port_id == logical_port_id)
Expand Down Expand Up @@ -2790,7 +2790,7 @@ static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev,

adapter->ebus_dev = dev;

adapter_handle = get_property(dev->ofdev.node, "ibm,hea-handle",
adapter_handle = of_get_property(dev->ofdev.node, "ibm,hea-handle",
NULL);
if (adapter_handle)
adapter->handle = *adapter_handle;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/mace.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
return -ENODEV;
}

addr = get_property(mace, "mac-address", NULL);
addr = of_get_property(mace, "mac-address", NULL);
if (addr == NULL) {
addr = get_property(mace, "local-mac-address", NULL);
addr = of_get_property(mace, "local-mac-address", NULL);
if (addr == NULL) {
printk(KERN_ERR "Can't get mac-address for MACE %s\n",
mace->full_name);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/pasemi_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac)
return -ENOENT;
}

maddr = get_property(dn, "mac-address", NULL);
maddr = of_get_property(dn, "mac-address", NULL);
if (maddr == NULL) {
dev_warn(&pdev->dev,
"no mac address in device tree, not configuring\n");
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/spider_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,7 @@ spider_net_init_firmware(struct spider_net_card *card)
if (!dn)
goto out_err;

fw_prop = get_property(dn, "firmware", &fw_size);
fw_prop = of_get_property(dn, "firmware", &fw_size);
if (!fw_prop)
goto out_err;

Expand Down Expand Up @@ -2236,7 +2236,7 @@ spider_net_setup_netdev(struct spider_net_card *card)
if (!dn)
return -EIO;

mac = get_property(dn, "local-mac-address", NULL);
mac = of_get_property(dn, "local-mac-address", NULL);
if (!mac)
return -EIO;
memcpy(addr.sa_data, mac, ETH_ALEN);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sungem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2903,7 +2903,7 @@ static int __devinit gem_get_device_address(struct gem *gp)
struct net_device *dev = gp->dev;
const unsigned char *addr;

addr = get_property(gp->of_node, "local-mac-address", NULL);
addr = of_get_property(gp->of_node, "local-mac-address", NULL);
if (addr == NULL) {
#ifdef CONFIG_SPARC
addr = idprom->id_ethaddr;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/sungem_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ static int bcm5421_init(struct mii_phy* phy)
if (phy->platform_data) {
struct device_node *np = of_get_parent(phy->platform_data);
int can_low_power = 1;
if (np == NULL || get_property(np, "no-autolowpower", NULL))
if (np == NULL || of_get_property(np, "no-autolowpower", NULL))
can_low_power = 0;
if (can_low_power) {
/* Enable automatic low-power */
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/net/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3787,17 +3787,17 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma

ugeth_vdbg("%s: IN", __FUNCTION__);

prop = get_property(np, "device-id", NULL);
prop = of_get_property(np, "device-id", NULL);
ucc_num = *prop - 1;
if ((ucc_num < 0) || (ucc_num > 7))
return -ENODEV;

ug_info = &ugeth_info[ucc_num];
ug_info->uf_info.ucc_num = ucc_num;

prop = get_property(np, "rx-clock", NULL);
prop = of_get_property(np, "rx-clock", NULL);
ug_info->uf_info.rx_clock = *prop;
prop = get_property(np, "tx-clock", NULL);
prop = of_get_property(np, "tx-clock", NULL);
ug_info->uf_info.tx_clock = *prop;
err = of_address_to_resource(np, 0, &res);
if (err)
Expand All @@ -3806,23 +3806,23 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
ug_info->uf_info.regs = res.start;
ug_info->uf_info.irq = irq_of_parse_and_map(np, 0);

ph = get_property(np, "phy-handle", NULL);
ph = of_get_property(np, "phy-handle", NULL);
phy = of_find_node_by_phandle(*ph);

if (phy == NULL)
return -ENODEV;

/* set the PHY address */
prop = get_property(phy, "reg", NULL);
prop = of_get_property(phy, "reg", NULL);
if (prop == NULL)
return -1;
ug_info->phy_address = *prop;

/* get the phy interface type, or default to MII */
prop = get_property(np, "interface-type", NULL);
prop = of_get_property(np, "interface-type", NULL);
if (!prop) {
/* handle interface property present in old trees */
prop = get_property(phy, "interface", NULL);
prop = of_get_property(phy, "interface", NULL);
if (prop != NULL)
phy_interface = enet_to_phy_interface[*prop];
else
Expand All @@ -3832,10 +3832,10 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
}

/* get speed, or derive from interface */
prop = get_property(np, "max-speed", NULL);
prop = of_get_property(np, "max-speed", NULL);
if (!prop) {
/* handle interface property present in old trees */
prop = get_property(phy, "interface", NULL);
prop = of_get_property(phy, "interface", NULL);
if (prop != NULL)
max_speed = enet_to_speed[*prop];
} else {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ucc_geth_mii.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
while ((child = of_get_next_child(np, child)) != NULL) {
int irq = irq_of_parse_and_map(child, 0);
if (irq != NO_IRQ) {
const u32 *id = get_property(child, "reg", NULL);
const u32 *id = of_get_property(child, "reg", NULL);
new_bus->irq[*id] = irq;
}
}
Expand Down Expand Up @@ -203,7 +203,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
if ((res.start >= tempres.start) &&
(res.end <= tempres.end)) {
/* set this UCC to be the MII master */
const u32 *id = get_property(tempnp, "device-id", NULL);
const u32 *id = of_get_property(tempnp, "device-id", NULL);
if (id == NULL)
goto bus_register_fail;

Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/pci/hotplug/rpaphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ static int get_children_props(struct device_node *dn, const int **drc_indexes,
{
const int *indexes, *names, *types, *domains;

indexes = get_property(dn, "ibm,drc-indexes", NULL);
names = get_property(dn, "ibm,drc-names", NULL);
types = get_property(dn, "ibm,drc-types", NULL);
domains = get_property(dn, "ibm,drc-power-domains", NULL);
indexes = of_get_property(dn, "ibm,drc-indexes", NULL);
names = of_get_property(dn, "ibm,drc-names", NULL);
types = of_get_property(dn, "ibm,drc-types", NULL);
domains = of_get_property(dn, "ibm,drc-power-domains", NULL);

if (!indexes || !names || !types || !domains) {
/* Slot does not have dynamically-removable children */
Expand Down Expand Up @@ -218,7 +218,7 @@ int rpaphp_get_drc_props(struct device_node *dn, int *drc_index,
char *name_tmp, *type_tmp;
int i, rc;

my_index = get_property(dn, "ibm,my-drc-index", NULL);
my_index = of_get_property(dn, "ibm,my-drc-index", NULL);
if (!my_index) {
/* Node isn't DLPAR/hotplug capable */
return -EINVAL;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/scsi/ibmvscsi/ibmvstgt.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,16 +903,16 @@ static int get_system_info(void)
if (!rootdn)
return -ENOENT;

model = get_property(rootdn, "model", NULL);
id = get_property(rootdn, "system-id", NULL);
model = of_get_property(rootdn, "model", NULL);
id = of_get_property(rootdn, "system-id", NULL);
if (model && id)
snprintf(system_id, sizeof(system_id), "%s-%s", model, id);

name = get_property(rootdn, "ibm,partition-name", NULL);
name = of_get_property(rootdn, "ibm,partition-name", NULL);
if (name)
strncpy(partition_name, name, sizeof(partition_name));

num = get_property(rootdn, "ibm,partition-no", NULL);
num = of_get_property(rootdn, "ibm,partition-no", NULL);
if (num)
partition_number = *num;

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ static void gather_partition_info(void)
return;
}

ppartition_name = get_property(rootdn, "ibm,partition-name", NULL);
ppartition_name = of_get_property(rootdn, "ibm,partition-name", NULL);
if (ppartition_name)
strncpy(partition_name, ppartition_name,
sizeof(partition_name));
p_number_ptr = get_property(rootdn, "ibm,partition-no", NULL);
p_number_ptr = of_get_property(rootdn, "ibm,partition-no", NULL);
if (p_number_ptr)
partition_number = *p_number_ptr;
of_node_put(rootdn);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/mac53c94.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *mat
goto out_free;
}

clkprop = get_property(node, "clock-frequency", &proplen);
clkprop = of_get_property(node, "clock-frequency", &proplen);
if (clkprop == NULL || proplen != sizeof(int)) {
printk(KERN_ERR "%s: can't get clock frequency, "
"assuming 25MHz\n", node->full_name);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1947,7 +1947,7 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match)
ms->tgts[tgt].current_req = NULL;
}

if ((cfp = get_property(mesh, "clock-frequency", NULL)))
if ((cfp = of_get_property(mesh, "clock-frequency", NULL)))
ms->clk_freq = *cfp;
else {
printk(KERN_INFO "mesh: assuming 50MHz clock frequency\n");
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/serial/mpc52xx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ mpc52xx_uart_of_enumerate(void)
continue;

/* Is a particular device number requested? */
devno = get_property(np, "port-number", NULL);
devno = of_get_property(np, "port-number", NULL);
mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1);
}

Expand Down
Loading

0 comments on commit 288c29a

Please sign in to comment.