]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-stk17ta8.c
Merge branch 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-stk17ta8.c
index f10d3facecbeb16e7be17189dbe3835619b293a3..9a7e920315fa76c6af27d307c913df0b184dadad 100644 (file)
@@ -215,17 +215,6 @@ static irqreturn_t stk17ta8_rtc_interrupt(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static void stk17ta8_rtc_release(struct device *dev)
-{
-       struct platform_device *pdev = to_platform_device(dev);
-       struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
-
-       if (pdata->irq >= 0) {
-               pdata->irqen = 0;
-               stk17ta8_rtc_update_alarm(pdata);
-       }
-}
-
 static int stk17ta8_rtc_ioctl(struct device *dev, unsigned int cmd,
                            unsigned long arg)
 {
@@ -254,11 +243,11 @@ static const struct rtc_class_ops stk17ta8_rtc_ops = {
        .set_time       = stk17ta8_rtc_set_time,
        .read_alarm     = stk17ta8_rtc_read_alarm,
        .set_alarm      = stk17ta8_rtc_set_alarm,
-       .release        = stk17ta8_rtc_release,
        .ioctl          = stk17ta8_rtc_ioctl,
 };
 
-static ssize_t stk17ta8_nvram_read(struct kobject *kobj, char *buf,
+static ssize_t stk17ta8_nvram_read(struct kobject *kobj,
+                                struct bin_attribute *attr, char *buf,
                                 loff_t pos, size_t size)
 {
        struct platform_device *pdev =
@@ -272,7 +261,8 @@ static ssize_t stk17ta8_nvram_read(struct kobject *kobj, char *buf,
        return count;
 }
 
-static ssize_t stk17ta8_nvram_write(struct kobject *kobj, char *buf,
+static ssize_t stk17ta8_nvram_write(struct kobject *kobj,
+                                 struct bin_attribute *attr, char *buf,
                                  loff_t pos, size_t size)
 {
        struct platform_device *pdev =
@@ -289,7 +279,7 @@ static ssize_t stk17ta8_nvram_write(struct kobject *kobj, char *buf,
 static struct bin_attribute stk17ta8_nvram_attr = {
        .attr = {
                .name = "nvram",
-               .mode = S_IRUGO | S_IWUGO,
+               .mode = S_IRUGO | S_IWUSR,
                .owner = THIS_MODULE,
        },
        .size = RTC_OFFSET,
@@ -392,6 +382,9 @@ static int __devexit stk17ta8_rtc_remove(struct platform_device *pdev)
        return 0;
 }
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:stk17ta8");
+
 static struct platform_driver stk17ta8_rtc_driver = {
        .probe          = stk17ta8_rtc_probe,
        .remove         = __devexit_p(stk17ta8_rtc_remove),