Lines Matching refs:sdev
297 static void serial_stub_putc(struct stdio_dev *sdev, const char ch) in serial_stub_putc() argument
299 _serial_putc(sdev->priv, ch); in serial_stub_putc()
303 static void serial_stub_puts(struct stdio_dev *sdev, const char *str) in serial_stub_puts() argument
305 _serial_puts(sdev->priv, str); in serial_stub_puts()
308 static int serial_stub_getc(struct stdio_dev *sdev) in serial_stub_getc() argument
310 return _serial_getc(sdev->priv); in serial_stub_getc()
313 static int serial_stub_tstc(struct stdio_dev *sdev) in serial_stub_tstc() argument
315 return _serial_tstc(sdev->priv); in serial_stub_tstc()
386 struct stdio_dev sdev; in serial_post_probe() local
416 memset(&sdev, '\0', sizeof(sdev)); in serial_post_probe()
418 strncpy(sdev.name, dev->name, sizeof(sdev.name)); in serial_post_probe()
419 sdev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_INPUT | DEV_FLAGS_DM; in serial_post_probe()
420 sdev.priv = dev; in serial_post_probe()
421 sdev.putc = serial_stub_putc; in serial_post_probe()
422 sdev.puts = serial_stub_puts; in serial_post_probe()
423 sdev.getc = serial_stub_getc; in serial_post_probe()
424 sdev.tstc = serial_stub_tstc; in serial_post_probe()
431 stdio_register_dev(&sdev, &upriv->sdev); in serial_post_probe()
441 if (stdio_deregister_dev(upriv->sdev, true)) in serial_pre_remove()