summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/rtc/rtc-ds1305.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/rtc/rtc-ds1305.c')
-rw-r--r--kernel/drivers/rtc/rtc-ds1305.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/kernel/drivers/rtc/rtc-ds1305.c b/kernel/drivers/rtc/rtc-ds1305.c
index 12b07158a..85706a9f8 100644
--- a/kernel/drivers/rtc/rtc-ds1305.c
+++ b/kernel/drivers/rtc/rtc-ds1305.c
@@ -538,15 +538,6 @@ ds1305_nvram_read(struct file *filp, struct kobject *kobj,
spi = container_of(kobj, struct spi_device, dev.kobj);
- if (unlikely(off >= DS1305_NVRAM_LEN))
- return 0;
- if (count >= DS1305_NVRAM_LEN)
- count = DS1305_NVRAM_LEN;
- if ((off + count) > DS1305_NVRAM_LEN)
- count = DS1305_NVRAM_LEN - off;
- if (unlikely(!count))
- return count;
-
addr = DS1305_NVRAM + off;
msg_init(&m, x, &addr, count, NULL, buf);
@@ -569,15 +560,6 @@ ds1305_nvram_write(struct file *filp, struct kobject *kobj,
spi = container_of(kobj, struct spi_device, dev.kobj);
- if (unlikely(off >= DS1305_NVRAM_LEN))
- return -EFBIG;
- if (count >= DS1305_NVRAM_LEN)
- count = DS1305_NVRAM_LEN;
- if ((off + count) > DS1305_NVRAM_LEN)
- count = DS1305_NVRAM_LEN - off;
- if (unlikely(!count))
- return count;
-
addr = (DS1305_WRITE | DS1305_NVRAM) + off;
msg_init(&m, x, &addr, count, buf, NULL);
@@ -790,7 +772,6 @@ static int ds1305_remove(struct spi_device *spi)
static struct spi_driver ds1305_driver = {
.driver.name = "rtc-ds1305",
- .driver.owner = THIS_MODULE,
.probe = ds1305_probe,
.remove = ds1305_remove,
/* REVISIT add suspend/resume */