Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235484
b: refs/heads/master
c: 71d6429
h: refs/heads/master
v: v3
  • Loading branch information
Marc Kleine-Budde authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent 3b95914 commit f36f001
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 9194a595f756d2e428ddb8e74eb4932d39963aad
refs/heads/master: 71d642908d4e8e7a2a4a6e0490432e719ff466d5
11 changes: 9 additions & 2 deletions trunk/include/linux/platform_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,15 @@ extern void platform_driver_unregister(struct platform_driver *);
extern int platform_driver_probe(struct platform_driver *driver,
int (*probe)(struct platform_device *));

#define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
#define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data))
static inline void *platform_get_drvdata(const struct platform_device *pdev)
{
return dev_get_drvdata(&pdev->dev);
}

static inline void platform_set_drvdata(struct platform_device *pdev, void *data)
{
dev_set_drvdata(&pdev->dev, data);
}

extern struct platform_device *platform_create_bundle(struct platform_driver *driver,
int (*probe)(struct platform_device *),
Expand Down

0 comments on commit f36f001

Please sign in to comment.