Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319151
b: refs/heads/master
c: 2356021
h: refs/heads/master
i:
  319149: 63b0efc
  319147: a8dac12
  319143: d33fad7
  319135: 974f21e
v: v3
  • Loading branch information
Alessandro Rubini authored and Wolfram Sang committed Jul 9, 2012
1 parent 960fd09 commit b2a425e
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 87 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: af97bace2cca58ee7c94bf4d31e820f29688d7a5
refs/heads/master: 235602146ec9c1882edf1ccc68389c1176be8198
22 changes: 5 additions & 17 deletions trunk/arch/arm/mach-ux500/devices-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,15 @@ dbx500_add_uart(struct device *parent, const char *name, resource_size_t base,

struct nmk_i2c_controller;

static inline struct platform_device *
static inline struct amba_device *
dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq,
struct nmk_i2c_controller *data)
{
struct resource res[] = {
DEFINE_RES_MEM(base, SZ_4K),
DEFINE_RES_IRQ(irq),
};
/* Conjure a name similar to what the platform device used to have */
char name[16];

struct platform_device_info pdevinfo = {
.parent = parent,
.name = "nmk-i2c",
.id = id,
.res = res,
.num_res = ARRAY_SIZE(res),
.data = data,
.size_data = sizeof(*data),
.dma_mask = DMA_BIT_MASK(32),
};

return platform_device_register_full(&pdevinfo);
snprintf(name, sizeof(name), "nmk-i2c.%d", id);
return amba_apb_device_add(parent, name, base, SZ_4K, irq, 0, data, 0);
}

static inline struct amba_device *
Expand Down
Loading

0 comments on commit b2a425e

Please sign in to comment.