sun_uflash.c (19fdb9eefb21b72edbc365b838502780c392bad6) sun_uflash.c (4018294b53d1dae026880e45f174c1cc63b5d435)
1/* sun_uflash.c - Driver for user-programmable flash on
2 * Sun Microsystems SME boardsets.
3 *
4 * This driver does NOT provide access to the OBP-flash for
5 * safety reasons-- use <linux>/drivers/sbus/char/flash.c instead.
6 *
7 * Copyright (c) 2001 Eric Brower (ebrower@usa.net)
8 */

--- 96 unchanged lines hidden (view full) ---

105
106 dev_set_drvdata(&op->dev, up);
107
108 return 0;
109}
110
111static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match)
112{
1/* sun_uflash.c - Driver for user-programmable flash on
2 * Sun Microsystems SME boardsets.
3 *
4 * This driver does NOT provide access to the OBP-flash for
5 * safety reasons-- use <linux>/drivers/sbus/char/flash.c instead.
6 *
7 * Copyright (c) 2001 Eric Brower (ebrower@usa.net)
8 */

--- 96 unchanged lines hidden (view full) ---

105
106 dev_set_drvdata(&op->dev, up);
107
108 return 0;
109}
110
111static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match)
112{
113 struct device_node *dp = op->node;
113 struct device_node *dp = op->dev.of_node;
114
115 /* Flashprom must have the "user" property in order to
116 * be used by this driver.
117 */
118 if (!of_find_property(dp, "user", NULL))
119 return -ENODEV;
120
121 return uflash_devinit(op, dp);

--- 22 unchanged lines hidden (view full) ---

144 .name = UFLASH_OBPNAME,
145 },
146 {},
147};
148
149MODULE_DEVICE_TABLE(of, uflash_match);
150
151static struct of_platform_driver uflash_driver = {
114
115 /* Flashprom must have the "user" property in order to
116 * be used by this driver.
117 */
118 if (!of_find_property(dp, "user", NULL))
119 return -ENODEV;
120
121 return uflash_devinit(op, dp);

--- 22 unchanged lines hidden (view full) ---

144 .name = UFLASH_OBPNAME,
145 },
146 {},
147};
148
149MODULE_DEVICE_TABLE(of, uflash_match);
150
151static struct of_platform_driver uflash_driver = {
152 .name = DRIVER_NAME,
153 .match_table = uflash_match,
152 .driver = {
153 .name = DRIVER_NAME,
154 .owner = THIS_MODULE,
155 .of_match_table = uflash_match,
156 },
154 .probe = uflash_probe,
155 .remove = __devexit_p(uflash_remove),
156};
157
158static int __init uflash_init(void)
159{
160 return of_register_driver(&uflash_driver, &of_bus_type);
161}
162
163static void __exit uflash_exit(void)
164{
165 of_unregister_driver(&uflash_driver);
166}
167
168module_init(uflash_init);
169module_exit(uflash_exit);
157 .probe = uflash_probe,
158 .remove = __devexit_p(uflash_remove),
159};
160
161static int __init uflash_init(void)
162{
163 return of_register_driver(&uflash_driver, &of_bus_type);
164}
165
166static void __exit uflash_exit(void)
167{
168 of_unregister_driver(&uflash_driver);
169}
170
171module_init(uflash_init);
172module_exit(uflash_exit);