mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
rtc: ds1307: remove member irq from struct ds1307
The irq number is used in the probe function only, so we don't have to store it in struct ds1307. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
parent
79c676c4e3
commit
340fd7bce0
1 changed files with 5 additions and 7 deletions
|
@ -126,7 +126,6 @@ struct ds1307 {
|
|||
struct device *dev;
|
||||
struct regmap *regmap;
|
||||
const char *name;
|
||||
int irq;
|
||||
struct rtc_device *rtc;
|
||||
#ifdef CONFIG_COMMON_CLK
|
||||
struct clk_hw clks[2];
|
||||
|
@ -1334,7 +1333,6 @@ static int ds1307_probe(struct i2c_client *client,
|
|||
dev_set_drvdata(&client->dev, ds1307);
|
||||
ds1307->dev = &client->dev;
|
||||
ds1307->name = client->name;
|
||||
ds1307->irq = client->irq;
|
||||
|
||||
ds1307->regmap = devm_regmap_init_i2c(client, ®map_config);
|
||||
if (IS_ERR(ds1307->regmap)) {
|
||||
|
@ -1414,7 +1412,7 @@ static int ds1307_probe(struct i2c_client *client,
|
|||
* For some variants, be sure alarms can trigger when we're
|
||||
* running on Vbackup (BBSQI/BBSQW)
|
||||
*/
|
||||
if (chip->alarm && (ds1307->irq > 0 ||
|
||||
if (chip->alarm && (client->irq > 0 ||
|
||||
ds1307_can_wakeup_device)) {
|
||||
ds1307->regs[0] |= DS1337_BIT_INTCN
|
||||
| bbsqi_bitpos[ds1307->type];
|
||||
|
@ -1499,7 +1497,7 @@ static int ds1307_probe(struct i2c_client *client,
|
|||
case rx_8130:
|
||||
ds1307->offset = 0x10; /* Seconds starts at 0x10 */
|
||||
rtc_ops = &rx8130_rtc_ops;
|
||||
if (chip->alarm && ds1307->irq > 0) {
|
||||
if (chip->alarm && client->irq > 0) {
|
||||
irq_handler = rx8130_irq;
|
||||
want_irq = true;
|
||||
}
|
||||
|
@ -1509,7 +1507,7 @@ static int ds1307_probe(struct i2c_client *client,
|
|||
break;
|
||||
case mcp794xx:
|
||||
rtc_ops = &mcp794xx_rtc_ops;
|
||||
if (chip->alarm && (ds1307->irq > 0 ||
|
||||
if (chip->alarm && (client->irq > 0 ||
|
||||
ds1307_can_wakeup_device)) {
|
||||
irq_handler = mcp794xx_irq;
|
||||
want_irq = true;
|
||||
|
@ -1655,7 +1653,7 @@ static int ds1307_probe(struct i2c_client *client,
|
|||
return PTR_ERR(ds1307->rtc);
|
||||
}
|
||||
|
||||
if (ds1307_can_wakeup_device && ds1307->irq <= 0) {
|
||||
if (ds1307_can_wakeup_device && client->irq <= 0) {
|
||||
/* Disable request for an IRQ */
|
||||
want_irq = false;
|
||||
dev_info(ds1307->dev,
|
||||
|
@ -1666,7 +1664,7 @@ static int ds1307_probe(struct i2c_client *client,
|
|||
|
||||
if (want_irq) {
|
||||
err = devm_request_threaded_irq(ds1307->dev,
|
||||
ds1307->irq, NULL, irq_handler,
|
||||
client->irq, NULL, irq_handler,
|
||||
IRQF_SHARED | IRQF_ONESHOT,
|
||||
ds1307->name, ds1307);
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in a new issue