On Jan 30, 2008 6:00 AM, Jiri Slaby <jirislaby@xxxxxxxxx> wrote:On 01/30/2008 11:36 AM, Bryan Wu wrote:+ ret = cdev_add(&bfin_otp_cdev, bfin_otp_dev_node, 1);Anyway, wouldn't be easier/better to use misc.c functionality here
+ if (ret) {
+ unregister_chrdev_region(bfin_otp_dev_node, 1);
+ printk(KERN_ERR PFX "unable to register char device\n");
+ return ret;
+ }
+
+ bfin_otp_class = class_create(THIS_MODULE, "otp");
+ device_create(bfin_otp_class, NULL, bfin_otp_dev_node, "otp");
(misc_register() et al.)?
probably ... i just didnt want to statically allocate a number in the
range that would be Blackfin specific ...