Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177968
b: refs/heads/master
c: 3ecf44b
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare committed Dec 16, 2009
1 parent a8ce498 commit 22826d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 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: a0e92d70f35b5fd7da8ec2160cda78b98e2113bc
refs/heads/master: 3ecf44b312758d10be20539b06b2df5d77d59cdb
24 changes: 11 additions & 13 deletions trunk/drivers/hwmon/smsc47m1.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ struct smsc47m1_sio_data {
};


static int smsc47m1_probe(struct platform_device *pdev);
static int __devexit smsc47m1_remove(struct platform_device *pdev);
static int __exit smsc47m1_remove(struct platform_device *pdev);
static struct smsc47m1_data *smsc47m1_update_device(struct device *dev,
int init);

Expand All @@ -160,8 +159,7 @@ static struct platform_driver smsc47m1_driver = {
.owner = THIS_MODULE,
.name = DRVNAME,
},
.probe = smsc47m1_probe,
.remove = __devexit_p(smsc47m1_remove),
.remove = __exit_p(smsc47m1_remove),
};

static ssize_t get_fan(struct device *dev, struct device_attribute
Expand Down Expand Up @@ -562,7 +560,7 @@ static int smsc47m1_handle_resources(unsigned short address, enum chips type,
return 0;
}

static int __devinit smsc47m1_probe(struct platform_device *pdev)
static int __init smsc47m1_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct smsc47m1_sio_data *sio_data = dev->platform_data;
Expand Down Expand Up @@ -720,7 +718,7 @@ static int __devinit smsc47m1_probe(struct platform_device *pdev)
return err;
}

static int __devexit smsc47m1_remove(struct platform_device *pdev)
static int __exit smsc47m1_remove(struct platform_device *pdev)
{
struct smsc47m1_data *data = platform_get_drvdata(pdev);
struct resource *res;
Expand Down Expand Up @@ -845,27 +843,27 @@ static int __init sm_smsc47m1_init(void)
if (smsc47m1_find(&address, &sio_data))
return -ENODEV;

err = platform_driver_register(&smsc47m1_driver);
/* Sets global pdev as a side effect */
err = smsc47m1_device_add(address, &sio_data);
if (err)
goto exit;

/* Sets global pdev as a side effect */
err = smsc47m1_device_add(address, &sio_data);
err = platform_driver_probe(&smsc47m1_driver, smsc47m1_probe);
if (err)
goto exit_driver;
goto exit_device;

return 0;

exit_driver:
platform_driver_unregister(&smsc47m1_driver);
exit_device:
platform_device_unregister(pdev);
exit:
return err;
}

static void __exit sm_smsc47m1_exit(void)
{
platform_device_unregister(pdev);
platform_driver_unregister(&smsc47m1_driver);
platform_device_unregister(pdev);
}

MODULE_AUTHOR("Mark D. Studebaker <mdsxyz123@yahoo.com>");
Expand Down

0 comments on commit 22826d5

Please sign in to comment.