Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67970
b: refs/heads/master
c: 1359555
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent d901545 commit 7a72a65
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 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: 44b760a825fae65629fb04b1deeab68c6bef5c50
refs/heads/master: 1359555eb77d240b7c1d7ee75bb07e89e89770e4
7 changes: 4 additions & 3 deletions trunk/drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static void platform_device_release(struct device *dev)
* Create a platform device object which can have other objects attached
* to it, and which will have attached objects freed when it is released.
*/
struct platform_device *platform_device_alloc(const char *name, unsigned int id)
struct platform_device *platform_device_alloc(const char *name, int id)
{
struct platform_object *pa;

Expand Down Expand Up @@ -245,7 +245,8 @@ int platform_device_add(struct platform_device *pdev)
pdev->dev.bus = &platform_bus_type;

if (pdev->id != -1)
snprintf(pdev->dev.bus_id, BUS_ID_SIZE, "%s.%u", pdev->name, pdev->id);
snprintf(pdev->dev.bus_id, BUS_ID_SIZE, "%s.%d", pdev->name,
pdev->id);
else
strlcpy(pdev->dev.bus_id, pdev->name, BUS_ID_SIZE);

Expand Down Expand Up @@ -359,7 +360,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister);
* the Linux driver model. In particular, when such drivers are built
* as modules, they can't be "hotplugged".
*/
struct platform_device *platform_device_register_simple(char *name, unsigned int id,
struct platform_device *platform_device_register_simple(char *name, int id,
struct resource *res, unsigned int num)
{
struct platform_device *pdev;
Expand Down
7 changes: 4 additions & 3 deletions trunk/include/linux/platform_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

struct platform_device {
const char * name;
u32 id;
int id;
struct device dev;
u32 num_resources;
struct resource * resource;
Expand All @@ -35,9 +35,10 @@ extern struct resource *platform_get_resource_byname(struct platform_device *, u
extern int platform_get_irq_byname(struct platform_device *, char *);
extern int platform_add_devices(struct platform_device **, int);

extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int);
extern struct platform_device *platform_device_register_simple(char *, int id,
struct resource *, unsigned int);

extern struct platform_device *platform_device_alloc(const char *name, unsigned int id);
extern struct platform_device *platform_device_alloc(const char *name, int id);
extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num);
extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size);
extern int platform_device_add(struct platform_device *pdev);
Expand Down

0 comments on commit 7a72a65

Please sign in to comment.