hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/net/phy/spi_ks8995.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * SPI driver for Micrel/Kendin KS8995M and KSZ8864RMN ethernet switches
34 *
....@@ -5,10 +6,6 @@
56 *
67 * This file was based on: drivers/spi/at25.c
78 * Copyright (C) 2006 David Brownell
8
- *
9
- * This program is free software; you can redistribute it and/or modify it
10
- * under the terms of the GNU General Public License version 2 as published
11
- * by the Free Software Foundation.
129 */
1310
1411 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -303,7 +300,7 @@
303300 struct device *dev;
304301 struct ks8995_switch *ks8995;
305302
306
- dev = container_of(kobj, struct device, kobj);
303
+ dev = kobj_to_dev(kobj);
307304 ks8995 = dev_get_drvdata(dev);
308305
309306 return ks8995_read(ks8995, buf, off, count);
....@@ -315,7 +312,7 @@
315312 struct device *dev;
316313 struct ks8995_switch *ks8995;
317314
318
- dev = container_of(kobj, struct device, kobj);
315
+ dev = kobj_to_dev(kobj);
319316 ks8995 = dev_get_drvdata(dev);
320317
321318 return ks8995_write(ks8995, buf, off, count);