X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=kvmfornfv.git;a=blobdiff_plain;f=kernel%2Fdrivers%2Frtc%2Frtc-ds1305.c;h=85706a9f82c99429bcc7cefdc2760138c11193a2;hp=12b07158a3664de6aaaa2e3f42ae2266182473be;hb=e09b41010ba33a20a87472ee821fa407a5b8da36;hpb=f93b97fd65072de626c074dbe099a1fff05ce060 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 */