diff options
Diffstat (limited to 'drivers/tty/serial/sc16is7xx.c')
-rw-r--r-- | drivers/tty/serial/sc16is7xx.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 914825e03427..3284c31085a7 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c | |||
@@ -1060,7 +1060,6 @@ static int sc16is7xx_probe(struct device *dev, | |||
1060 | struct regmap *regmap, int irq, unsigned long flags) | 1060 | struct regmap *regmap, int irq, unsigned long flags) |
1061 | { | 1061 | { |
1062 | unsigned long freq, *pfreq = dev_get_platdata(dev); | 1062 | unsigned long freq, *pfreq = dev_get_platdata(dev); |
1063 | struct clk *clk; | ||
1064 | int i, ret; | 1063 | int i, ret; |
1065 | struct sc16is7xx_port *s; | 1064 | struct sc16is7xx_port *s; |
1066 | 1065 | ||
@@ -1076,14 +1075,14 @@ static int sc16is7xx_probe(struct device *dev, | |||
1076 | return -ENOMEM; | 1075 | return -ENOMEM; |
1077 | } | 1076 | } |
1078 | 1077 | ||
1079 | clk = devm_clk_get(dev, NULL); | 1078 | s->clk = devm_clk_get(dev, NULL); |
1080 | if (IS_ERR(clk)) { | 1079 | if (IS_ERR(s->clk)) { |
1081 | if (pfreq) | 1080 | if (pfreq) |
1082 | freq = *pfreq; | 1081 | freq = *pfreq; |
1083 | else | 1082 | else |
1084 | return PTR_ERR(clk); | 1083 | return PTR_ERR(s->clk); |
1085 | } else { | 1084 | } else { |
1086 | freq = clk_get_rate(clk); | 1085 | freq = clk_get_rate(s->clk); |
1087 | } | 1086 | } |
1088 | 1087 | ||
1089 | s->regmap = regmap; | 1088 | s->regmap = regmap; |