Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151114691
D15301.id42153.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
729 B
Referenced Files
None
Subscribers
None
D15301.id42153.diff
View Options
Index: sys/dev/spibus/spigen.c
===================================================================
--- sys/dev/spibus/spigen.c
+++ sys/dev/spibus/spigen.c
@@ -186,11 +186,22 @@
{
struct spigen_softc *sc;
const int unit = device_get_unit(dev);
+#ifdef FDT
+ int cs;
+
+ spibus_get_cs(dev, &cs);
+#endif
sc = device_get_softc(dev);
sc->sc_dev = dev;
sc->sc_cdev = make_dev(&spigen_cdevsw, unit,
+#ifdef FDT
+ /* is this right??? */
+ UID_ROOT, GID_OPERATOR, 0660, "spigen%d.%d",
+ device_get_unit(device_get_parent(dev)), cs);
+#else
UID_ROOT, GID_OPERATOR, 0660, "spigen%d", unit);
+#endif
sc->sc_cdev->si_drv1 = dev;
sc->sc_command_length_max = PAGE_SIZE;
sc->sc_data_length_max = PAGE_SIZE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 4:24 AM (6 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31010921
Default Alt Text
D15301.id42153.diff (729 B)
Attached To
Mode
D15301: alter spigen device name to indicate cs as sub-unit
Attached
Detach File
Event Timeline
Log In to Comment