mirror of https://gitee.com/openkylin/linux.git
can: mcp251x: Eliminate irq_flags from driver platform_data
Flags is not used by boards, so remove this field from the driver platform_data. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
1ddff7da0f
commit
ae5d589e5f
|
@ -935,8 +935,7 @@ static int mcp251x_open(struct net_device *net)
|
||||||
{
|
{
|
||||||
struct mcp251x_priv *priv = netdev_priv(net);
|
struct mcp251x_priv *priv = netdev_priv(net);
|
||||||
struct spi_device *spi = priv->spi;
|
struct spi_device *spi = priv->spi;
|
||||||
struct mcp251x_platform_data *pdata = spi->dev.platform_data;
|
unsigned long flags = IRQF_ONESHOT | IRQF_TRIGGER_FALLING;
|
||||||
unsigned long flags;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = open_candev(net);
|
ret = open_candev(net);
|
||||||
|
@ -952,12 +951,6 @@ static int mcp251x_open(struct net_device *net)
|
||||||
priv->tx_skb = NULL;
|
priv->tx_skb = NULL;
|
||||||
priv->tx_len = 0;
|
priv->tx_len = 0;
|
||||||
|
|
||||||
flags = IRQF_ONESHOT;
|
|
||||||
if (pdata->irq_flags)
|
|
||||||
flags |= pdata->irq_flags;
|
|
||||||
else
|
|
||||||
flags |= IRQF_TRIGGER_FALLING;
|
|
||||||
|
|
||||||
ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist,
|
ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist,
|
||||||
flags, DEVICE_NAME, priv);
|
flags, DEVICE_NAME, priv);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
|
@ -12,12 +12,10 @@
|
||||||
/*
|
/*
|
||||||
* struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
|
* struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
|
||||||
* @oscillator_frequency: - oscillator frequency in Hz
|
* @oscillator_frequency: - oscillator frequency in Hz
|
||||||
* @irq_flags: - IRQF configuration flags
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct mcp251x_platform_data {
|
struct mcp251x_platform_data {
|
||||||
unsigned long oscillator_frequency;
|
unsigned long oscillator_frequency;
|
||||||
unsigned long irq_flags;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __CAN_PLATFORM_MCP251X_H__ */
|
#endif /* __CAN_PLATFORM_MCP251X_H__ */
|
||||||
|
|
Loading…
Reference in New Issue