Patch "spi: Micrel eth switch: declare missing of table" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    spi: Micrel eth switch: declare missing of table

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     spi-micrel-eth-switch-declare-missing-of-table.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0083301210512d97307ef5d0f4f05352ec3b9653
Author: Daniel Gomez <dagmcr@xxxxxxxxx>
Date:   Mon Apr 22 21:08:03 2019 +0200

    spi: Micrel eth switch: declare missing of table
    
    [ Upstream commit 2f23a2a768bee7ad2ff1e9527c3f7e279e794a46 ]
    
    Add missing <of_device_id> table for SPI driver relying on SPI
    device match since compatible is in a DT binding or in a DTS.
    
    Before this patch:
    modinfo drivers/net/phy/spi_ks8995.ko | grep alias
    alias:          spi:ksz8795
    alias:          spi:ksz8864
    alias:          spi:ks8995
    
    After this patch:
    modinfo drivers/net/phy/spi_ks8995.ko | grep alias
    alias:          spi:ksz8795
    alias:          spi:ksz8864
    alias:          spi:ks8995
    alias:          of:N*T*Cmicrel,ksz8795C*
    alias:          of:N*T*Cmicrel,ksz8795
    alias:          of:N*T*Cmicrel,ksz8864C*
    alias:          of:N*T*Cmicrel,ksz8864
    alias:          of:N*T*Cmicrel,ks8995C*
    alias:          of:N*T*Cmicrel,ks8995
    
    Reported-by: Javier Martinez Canillas <javier@xxxxxxxxxxxx>
    Signed-off-by: Daniel Gomez <dagmcr@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/phy/spi_ks8995.c b/drivers/net/phy/spi_ks8995.c
index 1e2d4f1179da3..45df03673e010 100644
--- a/drivers/net/phy/spi_ks8995.c
+++ b/drivers/net/phy/spi_ks8995.c
@@ -162,6 +162,14 @@ static const struct spi_device_id ks8995_id[] = {
 };
 MODULE_DEVICE_TABLE(spi, ks8995_id);
 
+static const struct of_device_id ks8895_spi_of_match[] = {
+        { .compatible = "micrel,ks8995" },
+        { .compatible = "micrel,ksz8864" },
+        { .compatible = "micrel,ksz8795" },
+        { },
+ };
+MODULE_DEVICE_TABLE(of, ks8895_spi_of_match);
+
 static inline u8 get_chip_id(u8 val)
 {
 	return (val >> ID1_CHIPID_S) & ID1_CHIPID_M;
@@ -529,6 +537,7 @@ static int ks8995_remove(struct spi_device *spi)
 static struct spi_driver ks8995_driver = {
 	.driver = {
 		.name	    = "spi-ks8995",
+		.of_match_table = of_match_ptr(ks8895_spi_of_match),
 	},
 	.probe	  = ks8995_probe,
 	.remove	  = ks8995_remove,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux