Browse Source

ser_gigaset: remove unnecessary kfree() calls from release method

device->platform_data and platform_device->resource are never used
and remain NULL through their entire life. Drops the kfree() calls
for them from the device release method.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt 9 years ago
parent
commit
8aeb3c3d65
1 changed files with 0 additions and 5 deletions
  1. 0 5
      drivers/isdn/gigaset/ser-gigaset.c

+ 0 - 5
drivers/isdn/gigaset/ser-gigaset.c

@@ -373,13 +373,8 @@ static void gigaset_freecshw(struct cardstate *cs)
 
 
 static void gigaset_device_release(struct device *dev)
 static void gigaset_device_release(struct device *dev)
 {
 {
-	struct platform_device *pdev = to_platform_device(dev);
 	struct cardstate *cs = dev_get_drvdata(dev);
 	struct cardstate *cs = dev_get_drvdata(dev);
 
 
-	/* adapted from platform_device_release() in drivers/base/platform.c */
-	kfree(dev->platform_data);
-	kfree(pdev->resource);
-
 	if (!cs)
 	if (!cs)
 		return;
 		return;
 	dev_set_drvdata(dev, NULL);
 	dev_set_drvdata(dev, NULL);