--- zzzz-none-000/linux-3.10.107/drivers/rtc/rtc-ds1672.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/rtc/rtc-ds1672.c 2021-02-04 17:41:59.000000000 +0000 @@ -153,11 +153,6 @@ .set_mmss = ds1672_rtc_set_mmss, }; -static int ds1672_remove(struct i2c_client *client) -{ - return 0; -} - static int ds1672_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -182,8 +177,9 @@ /* read control register */ err = ds1672_get_control(client, &control); - if (err) - goto exit_devreg; + if (err) { + dev_warn(&client->dev, "Unable to read the control register\n"); + } if (control & DS1672_REG_CONTROL_EOSC) dev_warn(&client->dev, "Oscillator not enabled. " @@ -192,25 +188,23 @@ /* Register sysfs hooks */ err = device_create_file(&client->dev, &dev_attr_control); if (err) - goto exit_devreg; + dev_err(&client->dev, "Unable to create sysfs entry: %s\n", + dev_attr_control.attr.name); return 0; - - exit_devreg: - return err; } static struct i2c_device_id ds1672_id[] = { { "ds1672", 0 }, { } }; +MODULE_DEVICE_TABLE(i2c, ds1672_id); static struct i2c_driver ds1672_driver = { .driver = { .name = "rtc-ds1672", }, .probe = &ds1672_probe, - .remove = &ds1672_remove, .id_table = ds1672_id, };