diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /drivers/char/hw_random | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/core.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 154a81d328c1..ebace201bec6 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c | |||
@@ -162,7 +162,8 @@ static struct miscdevice rng_miscdev = { | |||
162 | }; | 162 | }; |
163 | 163 | ||
164 | 164 | ||
165 | static ssize_t hwrng_attr_current_store(struct class_device *class, | 165 | static ssize_t hwrng_attr_current_store(struct device *dev, |
166 | struct device_attribute *attr, | ||
166 | const char *buf, size_t len) | 167 | const char *buf, size_t len) |
167 | { | 168 | { |
168 | int err; | 169 | int err; |
@@ -192,7 +193,8 @@ static ssize_t hwrng_attr_current_store(struct class_device *class, | |||
192 | return err ? : len; | 193 | return err ? : len; |
193 | } | 194 | } |
194 | 195 | ||
195 | static ssize_t hwrng_attr_current_show(struct class_device *class, | 196 | static ssize_t hwrng_attr_current_show(struct device *dev, |
197 | struct device_attribute *attr, | ||
196 | char *buf) | 198 | char *buf) |
197 | { | 199 | { |
198 | int err; | 200 | int err; |
@@ -210,7 +212,8 @@ static ssize_t hwrng_attr_current_show(struct class_device *class, | |||
210 | return ret; | 212 | return ret; |
211 | } | 213 | } |
212 | 214 | ||
213 | static ssize_t hwrng_attr_available_show(struct class_device *class, | 215 | static ssize_t hwrng_attr_available_show(struct device *dev, |
216 | struct device_attribute *attr, | ||
214 | char *buf) | 217 | char *buf) |
215 | { | 218 | { |
216 | int err; | 219 | int err; |
@@ -234,20 +237,18 @@ static ssize_t hwrng_attr_available_show(struct class_device *class, | |||
234 | return ret; | 237 | return ret; |
235 | } | 238 | } |
236 | 239 | ||
237 | static CLASS_DEVICE_ATTR(rng_current, S_IRUGO | S_IWUSR, | 240 | static DEVICE_ATTR(rng_current, S_IRUGO | S_IWUSR, |
238 | hwrng_attr_current_show, | 241 | hwrng_attr_current_show, |
239 | hwrng_attr_current_store); | 242 | hwrng_attr_current_store); |
240 | static CLASS_DEVICE_ATTR(rng_available, S_IRUGO, | 243 | static DEVICE_ATTR(rng_available, S_IRUGO, |
241 | hwrng_attr_available_show, | 244 | hwrng_attr_available_show, |
242 | NULL); | 245 | NULL); |
243 | 246 | ||
244 | 247 | ||
245 | static void unregister_miscdev(void) | 248 | static void unregister_miscdev(void) |
246 | { | 249 | { |
247 | class_device_remove_file(rng_miscdev.class, | 250 | device_remove_file(rng_miscdev.this_device, &dev_attr_rng_available); |
248 | &class_device_attr_rng_available); | 251 | device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current); |
249 | class_device_remove_file(rng_miscdev.class, | ||
250 | &class_device_attr_rng_current); | ||
251 | misc_deregister(&rng_miscdev); | 252 | misc_deregister(&rng_miscdev); |
252 | } | 253 | } |
253 | 254 | ||
@@ -258,20 +259,19 @@ static int register_miscdev(void) | |||
258 | err = misc_register(&rng_miscdev); | 259 | err = misc_register(&rng_miscdev); |
259 | if (err) | 260 | if (err) |
260 | goto out; | 261 | goto out; |
261 | err = class_device_create_file(rng_miscdev.class, | 262 | err = device_create_file(rng_miscdev.this_device, |
262 | &class_device_attr_rng_current); | 263 | &dev_attr_rng_current); |
263 | if (err) | 264 | if (err) |
264 | goto err_misc_dereg; | 265 | goto err_misc_dereg; |
265 | err = class_device_create_file(rng_miscdev.class, | 266 | err = device_create_file(rng_miscdev.this_device, |
266 | &class_device_attr_rng_available); | 267 | &dev_attr_rng_available); |
267 | if (err) | 268 | if (err) |
268 | goto err_remove_current; | 269 | goto err_remove_current; |
269 | out: | 270 | out: |
270 | return err; | 271 | return err; |
271 | 272 | ||
272 | err_remove_current: | 273 | err_remove_current: |
273 | class_device_remove_file(rng_miscdev.class, | 274 | device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current); |
274 | &class_device_attr_rng_current); | ||
275 | err_misc_dereg: | 275 | err_misc_dereg: |
276 | misc_deregister(&rng_miscdev); | 276 | misc_deregister(&rng_miscdev); |
277 | goto out; | 277 | goto out; |