Skip to content

Commit

Permalink
of: use __be32 types for big-endian device tree data
Browse files Browse the repository at this point in the history
Use the sparse annotations so we can keep track of endianness.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Jeremy Kerr authored and Grant Likely committed Oct 13, 2010
1 parent 52f6537 commit a9fadee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/of/address.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static int of_bus_pci_translate(u32 *addr, u64 offset, int na)
const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
unsigned int *flags)
{
const u32 *prop;
const __be32 *prop;
unsigned int psize;
struct device_node *parent;
struct of_bus *bus;
Expand Down
4 changes: 2 additions & 2 deletions drivers/of/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ DEFINE_RWLOCK(devtree_lock);

int of_n_addr_cells(struct device_node *np)
{
const int *ip;
const __be32 *ip;

do {
if (np->parent)
Expand All @@ -49,7 +49,7 @@ EXPORT_SYMBOL(of_n_addr_cells);

int of_n_size_cells(struct device_node *np)
{
const int *ip;
const __be32 *ip;

do {
if (np->parent)
Expand Down

0 comments on commit a9fadee

Please sign in to comment.