hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/s390/net/smsgiucv.c
....@@ -29,12 +29,9 @@
2929 MODULE_DESCRIPTION ("Linux for S/390 IUCV special message driver");
3030
3131 static struct iucv_path *smsg_path;
32
-/* dummy device used as trigger for PM functions */
33
-static struct device *smsg_dev;
3432
3533 static DEFINE_SPINLOCK(smsg_list_lock);
3634 static LIST_HEAD(smsg_list);
37
-static int iucv_path_connected;
3835
3936 static int smsg_path_pending(struct iucv_path *, u8 *, u8 *);
4037 static void smsg_message_pending(struct iucv_path *, struct iucv_message *);
....@@ -124,60 +121,15 @@
124121 kfree(cb);
125122 }
126123
127
-static int smsg_pm_freeze(struct device *dev)
128
-{
129
-#ifdef CONFIG_PM_DEBUG
130
- printk(KERN_WARNING "smsg_pm_freeze\n");
131
-#endif
132
- if (smsg_path && iucv_path_connected) {
133
- iucv_path_sever(smsg_path, NULL);
134
- iucv_path_connected = 0;
135
- }
136
- return 0;
137
-}
138
-
139
-static int smsg_pm_restore_thaw(struct device *dev)
140
-{
141
- int rc;
142
-
143
-#ifdef CONFIG_PM_DEBUG
144
- printk(KERN_WARNING "smsg_pm_restore_thaw\n");
145
-#endif
146
- if (smsg_path && !iucv_path_connected) {
147
- memset(smsg_path, 0, sizeof(*smsg_path));
148
- smsg_path->msglim = 255;
149
- smsg_path->flags = 0;
150
- rc = iucv_path_connect(smsg_path, &smsg_handler, "*MSG ",
151
- NULL, NULL, NULL);
152
-#ifdef CONFIG_PM_DEBUG
153
- if (rc)
154
- printk(KERN_ERR
155
- "iucv_path_connect returned with rc %i\n", rc);
156
-#endif
157
- if (!rc)
158
- iucv_path_connected = 1;
159
- cpcmd("SET SMSG IUCV", NULL, 0, NULL);
160
- }
161
- return 0;
162
-}
163
-
164
-static const struct dev_pm_ops smsg_pm_ops = {
165
- .freeze = smsg_pm_freeze,
166
- .thaw = smsg_pm_restore_thaw,
167
- .restore = smsg_pm_restore_thaw,
168
-};
169
-
170124 static struct device_driver smsg_driver = {
171125 .owner = THIS_MODULE,
172126 .name = SMSGIUCV_DRV_NAME,
173127 .bus = &iucv_bus,
174
- .pm = &smsg_pm_ops,
175128 };
176129
177130 static void __exit smsg_exit(void)
178131 {
179132 cpcmd("SET SMSG OFF", NULL, 0, NULL);
180
- device_unregister(smsg_dev);
181133 iucv_unregister(&smsg_handler, 1);
182134 driver_unregister(&smsg_driver);
183135 }
....@@ -205,27 +157,10 @@
205157 NULL, NULL, NULL);
206158 if (rc)
207159 goto out_free_path;
208
- else
209
- iucv_path_connected = 1;
210
- smsg_dev = kzalloc(sizeof(struct device), GFP_KERNEL);
211
- if (!smsg_dev) {
212
- rc = -ENOMEM;
213
- goto out_free_path;
214
- }
215
- dev_set_name(smsg_dev, "smsg_iucv");
216
- smsg_dev->bus = &iucv_bus;
217
- smsg_dev->parent = iucv_root;
218
- smsg_dev->release = (void (*)(struct device *))kfree;
219
- smsg_dev->driver = &smsg_driver;
220
- rc = device_register(smsg_dev);
221
- if (rc)
222
- goto out_put;
223160
224161 cpcmd("SET SMSG IUCV", NULL, 0, NULL);
225162 return 0;
226163
227
-out_put:
228
- put_device(smsg_dev);
229164 out_free_path:
230165 iucv_path_free(smsg_path);
231166 smsg_path = NULL;