- if (op->op == KD_FONT_OP_SET) {
- if (op->width != 8
- || (op->charcount != 256 && op->charcount != 512))
- return -EINVAL;
- rc = vgacon_do_font_op(&state, op->data, 1, op->charcount == 512);
- if (!rc && !(op->flags & KD_FONT_FLAG_DONT_RECALC))
- rc = vgacon_adjust_height(c, op->height);
- } else if (op->op == KD_FONT_OP_GET) {
- op->width = 8;
- op->height = c->vc_font.height;
- op->charcount = vga_512_chars ? 512 : 256;
- if (!op->data)
- return 0;
- rc = vgacon_do_font_op(&state, op->data, 0, 0);
- } else
- rc = -ENOSYS;
+ if (font->width != 8 || (charcount != 256 && charcount != 512))
+ return -EINVAL;
+
+ rc = vgacon_do_font_op(&state, font->data, 1, charcount == 512);
+ if (rc)
+ return rc;
+
+ if (!(flags & KD_FONT_FLAG_DONT_RECALC))
+ rc = vgacon_adjust_height(c, font->height);