Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53385
b: refs/heads/master
c: dc4c15d
h: refs/heads/master
i:
  53383: c17a099
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed May 3, 2007
1 parent 6826690 commit f4d59fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: c7308c81a8220ab68eebfadde37db881a2800064
refs/heads/master: dc4c15d44b2b43279b2667baa7645c65c2ff960e
8 changes: 5 additions & 3 deletions trunk/drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,20 +292,22 @@ EXPORT_SYMBOL_GPL(platform_device_add);
* @pdev: platform device we're removing
*
* Note that this function will also release all memory- and port-based
* resources owned by the device (@dev->resource).
* resources owned by the device (@dev->resource). This function
* must _only_ be externally called in error cases. All other usage
* is a bug.
*/
void platform_device_del(struct platform_device *pdev)
{
int i;

if (pdev) {
device_del(&pdev->dev);

for (i = 0; i < pdev->num_resources; i++) {
struct resource *r = &pdev->resource[i];
if (r->flags & (IORESOURCE_MEM|IORESOURCE_IO))
release_resource(r);
}

device_del(&pdev->dev);
}
}
EXPORT_SYMBOL_GPL(platform_device_del);
Expand Down

0 comments on commit f4d59fb

Please sign in to comment.