diff options
Diffstat (limited to 'drivers/eeprom/at24.c')
-rw-r--r-- | drivers/eeprom/at24.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/eeprom/at24.c b/drivers/eeprom/at24.c index 3103d7722a..88be3098cc 100644 --- a/drivers/eeprom/at24.c +++ b/drivers/eeprom/at24.c @@ -390,8 +390,8 @@ static int at24_probe(struct device_d *dev) chip.byte_len = BIT(magic & AT24_BITMASK(AT24_SIZE_BYTELEN)); magic >>= AT24_SIZE_BYTELEN; chip.flags = magic & AT24_BITMASK(AT24_SIZE_FLAGS); - if (dev->device_node && - !of_property_read_u32(dev->device_node, "pagesize", &page_size)) + if (dev->of_node && + !of_property_read_u32(dev->of_node, "pagesize", &page_size)) chip.page_size = page_size; else { /* @@ -427,7 +427,7 @@ static int at24_probe(struct device_d *dev) at24->chip = chip; at24->num_addresses = num_addresses; - alias = of_alias_get(dev->device_node); + alias = of_alias_get(dev->of_node); if (alias) { devname = xstrdup(alias); } else { @@ -441,7 +441,7 @@ static int at24_probe(struct device_d *dev) writable = !(chip.flags & AT24_FLAG_READONLY); - if (of_get_property(dev->device_node, "read-only", NULL)) + if (of_get_property(dev->of_node, "read-only", NULL)) writable = 0; if (writable) { @@ -456,10 +456,10 @@ static int at24_probe(struct device_d *dev) } at24->wp_gpio = -1; - if (dev->device_node) { + if (dev->of_node) { enum of_gpio_flags flags; - at24->wp_gpio = of_get_named_gpio_flags(dev->device_node, - "wp-gpios", 0, &flags); + at24->wp_gpio = of_get_named_gpio_flags(dev->of_node, + "wp-gpios", 0, &flags); if (gpio_is_valid(at24->wp_gpio)) { at24->wp_active_low = flags & OF_GPIO_ACTIVE_LOW; gpio_request(at24->wp_gpio, "eeprom-wp"); |