~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/mtd/maps/sun_uflash.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
 
102
102
        up->mtd->owner = THIS_MODULE;
103
103
 
104
 
        add_mtd_device(up->mtd);
 
104
        mtd_device_register(up->mtd, NULL, 0);
105
105
 
106
106
        dev_set_drvdata(&op->dev, up);
107
107
 
108
108
        return 0;
109
109
}
110
110
 
111
 
static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match)
 
111
static int __devinit uflash_probe(struct platform_device *op)
112
112
{
113
113
        struct device_node *dp = op->dev.of_node;
114
114
 
126
126
        struct uflash_dev *up = dev_get_drvdata(&op->dev);
127
127
 
128
128
        if (up->mtd) {
129
 
                del_mtd_device(up->mtd);
 
129
                mtd_device_unregister(up->mtd);
130
130
                map_destroy(up->mtd);
131
131
        }
132
132
        if (up->map.virt) {
148
148
 
149
149
MODULE_DEVICE_TABLE(of, uflash_match);
150
150
 
151
 
static struct of_platform_driver uflash_driver = {
 
151
static struct platform_driver uflash_driver = {
152
152
        .driver = {
153
153
                .name = DRIVER_NAME,
154
154
                .owner = THIS_MODULE,
160
160
 
161
161
static int __init uflash_init(void)
162
162
{
163
 
        return of_register_platform_driver(&uflash_driver);
 
163
        return platform_driver_register(&uflash_driver);
164
164
}
165
165
 
166
166
static void __exit uflash_exit(void)
167
167
{
168
 
        of_unregister_platform_driver(&uflash_driver);
 
168
        platform_driver_unregister(&uflash_driver);
169
169
}
170
170
 
171
171
module_init(uflash_init);