mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 07:04:00 +08:00
rtc: rs5c348: remove forward declaration
The name passed to devm_rtc_device_register is now unused. anyway, switch to devm_rtc_allocate_device to avoid forward declaring rs5c348_driver. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
02a6e12932
commit
2d7be4ed7a
@ -143,8 +143,6 @@ static const struct rtc_class_ops rs5c348_rtc_ops = {
|
|||||||
.set_time = rs5c348_rtc_set_time,
|
.set_time = rs5c348_rtc_set_time,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct spi_driver rs5c348_driver;
|
|
||||||
|
|
||||||
static int rs5c348_probe(struct spi_device *spi)
|
static int rs5c348_probe(struct spi_device *spi)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -195,15 +193,15 @@ static int rs5c348_probe(struct spi_device *spi)
|
|||||||
if (ret & RS5C348_BIT_24H)
|
if (ret & RS5C348_BIT_24H)
|
||||||
pdata->rtc_24h = 1;
|
pdata->rtc_24h = 1;
|
||||||
|
|
||||||
rtc = devm_rtc_device_register(&spi->dev, rs5c348_driver.driver.name,
|
rtc = devm_rtc_allocate_device(&spi->dev);
|
||||||
&rs5c348_rtc_ops, THIS_MODULE);
|
|
||||||
|
|
||||||
if (IS_ERR(rtc))
|
if (IS_ERR(rtc))
|
||||||
return PTR_ERR(rtc);
|
return PTR_ERR(rtc);
|
||||||
|
|
||||||
pdata->rtc = rtc;
|
pdata->rtc = rtc;
|
||||||
|
|
||||||
return 0;
|
rtc->ops = &rs5c348_rtc_ops;
|
||||||
|
|
||||||
|
return rtc_register_device(rtc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct spi_driver rs5c348_driver = {
|
static struct spi_driver rs5c348_driver = {
|
||||||
|
Loading…
Reference in New Issue
Block a user