diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 7c0bd6e..3f1a035 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -10,7 +10,7 @@
 
 omap2cam-objs	:=	omap24xxcam.o omap24xxcam-dma.o
 
-videodev-objs	:=	v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-subdev.o
+videodev-objs	:=	v4l2-dev.o v4l2-ioctl.o v4l2-device.o
 
 obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-int-device.o
 ifeq ($(CONFIG_COMPAT),y)
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
deleted file mode 100644
index dc88167..0000000
--- a/drivers/media/video/v4l2-subdev.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-    V4L2 sub-device support.
-
-    Copyright (C) 2008  Hans Verkuil <hverkuil@xs4all.nl>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#include <linux/i2c.h>
-#include <linux/videodev2.h>
-#include <media/v4l2-subdev.h>
-
-int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg)
-{
-	switch (cmd) {
-	case VIDIOC_QUERYCTRL:
-		return v4l2_subdev_call(sd, core, queryctrl, arg);
-	case VIDIOC_G_CTRL:
-		return v4l2_subdev_call(sd, core, g_ctrl, arg);
-	case VIDIOC_S_CTRL:
-		return v4l2_subdev_call(sd, core, s_ctrl, arg);
-	case VIDIOC_G_EXT_CTRLS:
-		return v4l2_subdev_call(sd, core, g_ext_ctrls, arg);
-	case VIDIOC_S_EXT_CTRLS:
-		return v4l2_subdev_call(sd, core, s_ext_ctrls, arg);
-	case VIDIOC_TRY_EXT_CTRLS:
-		return v4l2_subdev_call(sd, core, try_ext_ctrls, arg);
-	case VIDIOC_QUERYMENU:
-		return v4l2_subdev_call(sd, core, querymenu, arg);
-	case VIDIOC_LOG_STATUS:
-		return v4l2_subdev_call(sd, core, log_status);
-	case VIDIOC_DBG_G_CHIP_IDENT:
-		return v4l2_subdev_call(sd, core, g_chip_ident, arg);
-	case VIDIOC_INT_S_STANDBY:
-		return v4l2_subdev_call(sd, core, s_standby, arg ? (*(u32 *)arg) : 0);
-	case VIDIOC_INT_RESET:
-		return v4l2_subdev_call(sd, core, reset, arg ? (*(u32 *)arg) : 0);
-	case VIDIOC_INT_S_GPIO:
-		return v4l2_subdev_call(sd, core, s_gpio, arg ? (*(u32 *)arg) : 0);
-	case VIDIOC_INT_INIT:
-		return v4l2_subdev_call(sd, core, init, arg ? (*(u32 *)arg) : 0);
-#ifdef CONFIG_VIDEO_ADV_DEBUG
-	case VIDIOC_DBG_G_REGISTER:
-		return v4l2_subdev_call(sd, core, g_register, arg);
-	case VIDIOC_DBG_S_REGISTER:
-		return v4l2_subdev_call(sd, core, s_register, arg);
-#endif
-
-	case VIDIOC_INT_S_TUNER_MODE:
-		return v4l2_subdev_call(sd, tuner, s_mode, *(enum v4l2_tuner_type *)arg);
-	case AUDC_SET_RADIO:
-		return v4l2_subdev_call(sd, tuner, s_radio);
-	case VIDIOC_S_TUNER:
-		return v4l2_subdev_call(sd, tuner, s_tuner, arg);
-	case VIDIOC_G_TUNER:
-		return v4l2_subdev_call(sd, tuner, g_tuner, arg);
-	case VIDIOC_S_STD:
-		return v4l2_subdev_call(sd, tuner, s_std, *(v4l2_std_id *)arg);
-	case VIDIOC_S_FREQUENCY:
-		return v4l2_subdev_call(sd, tuner, s_frequency, arg);
-	case VIDIOC_G_FREQUENCY:
-		return v4l2_subdev_call(sd, tuner, g_frequency, arg);
-	case TUNER_SET_TYPE_ADDR:
-		return v4l2_subdev_call(sd, tuner, s_type_addr, arg);
-	case TUNER_SET_CONFIG:
-		return v4l2_subdev_call(sd, tuner, s_config, arg);
-
-	case VIDIOC_INT_AUDIO_CLOCK_FREQ:
-		return v4l2_subdev_call(sd, audio, s_clock_freq, *(u32 *)arg);
-	case VIDIOC_INT_S_AUDIO_ROUTING:
-		return v4l2_subdev_call(sd, audio, s_routing, arg);
-	case VIDIOC_INT_I2S_CLOCK_FREQ:
-		return v4l2_subdev_call(sd, audio, s_i2s_clock_freq, *(u32 *)arg);
-
-	case VIDIOC_INT_S_VIDEO_ROUTING:
-		return v4l2_subdev_call(sd, video, s_routing, arg);
-	case VIDIOC_INT_S_CRYSTAL_FREQ:
-		return v4l2_subdev_call(sd, video, s_crystal_freq, arg);
-	case VIDIOC_INT_DECODE_VBI_LINE:
-		return v4l2_subdev_call(sd, video, decode_vbi_line, arg);
-	case VIDIOC_INT_S_VBI_DATA:
-		return v4l2_subdev_call(sd, video, s_vbi_data, arg);
-	case VIDIOC_INT_G_VBI_DATA:
-		return v4l2_subdev_call(sd, video, g_vbi_data, arg);
-	case VIDIOC_G_SLICED_VBI_CAP:
-		return v4l2_subdev_call(sd, video, g_sliced_vbi_cap, arg);
-	case VIDIOC_ENUM_FMT:
-		return v4l2_subdev_call(sd, video, enum_fmt, arg);
-	case VIDIOC_TRY_FMT:
-		return v4l2_subdev_call(sd, video, try_fmt, arg);
-	case VIDIOC_S_FMT:
-		return v4l2_subdev_call(sd, video, s_fmt, arg);
-	case VIDIOC_G_FMT:
-		return v4l2_subdev_call(sd, video, g_fmt, arg);
-	case VIDIOC_INT_S_STD_OUTPUT:
-		return v4l2_subdev_call(sd, video, s_std_output, *(v4l2_std_id *)arg);
-	case VIDIOC_QUERYSTD:
-		return v4l2_subdev_call(sd, video, querystd, arg);
-	case VIDIOC_INT_G_INPUT_STATUS:
-		return v4l2_subdev_call(sd, video, g_input_status, arg);
-	case VIDIOC_STREAMON:
-		return v4l2_subdev_call(sd, video, s_stream, 1);
-	case VIDIOC_STREAMOFF:
-		return v4l2_subdev_call(sd, video, s_stream, 0);
-	case VIDIOC_S_PARM:
-		return v4l2_subdev_call(sd, video, s_parm, arg);
-	case VIDIOC_G_PARM:
-		return v4l2_subdev_call(sd, video, g_parm, arg);
-
-	default:
-		return v4l2_subdev_call(sd, core, ioctl, cmd, arg);
-	}
-}
-EXPORT_SYMBOL_GPL(v4l2_subdev_command);
diff --git a/include/media/v4l2-i2c-drv-legacy.h b/include/media/v4l2-i2c-drv-legacy.h
deleted file mode 100644
index e65dd9d..0000000
--- a/include/media/v4l2-i2c-drv-legacy.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * v4l2-i2c-drv-legacy.h - contains I2C handling code that's identical
- *		    for all V4L2 I2C drivers. Use this header if the
- *		    I2C driver is used by both legacy drivers and
- *		    drivers converted to the bus-based I2C API.
- *
- * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/* NOTE: the full version of this header is in the v4l-dvb repository
- * and allows v4l i2c drivers to be compiled on older kernels as well.
- * The version of this header as it appears in the kernel is a stripped
- * version (without all the backwards compatibility stuff) and so it
- * looks a bit odd.
- *
- * If you look at the full version then you will understand the reason
- * for introducing this header since you really don't want to have all
- * the tricky backwards compatibility code in each and every i2c driver.
- */
-
-struct v4l2_i2c_driver_data {
-	const char * const name;
-	int driverid;
-	int (*command)(struct i2c_client *client, unsigned int cmd, void *arg);
-	int (*probe)(struct i2c_client *client, const struct i2c_device_id *id);
-	int (*remove)(struct i2c_client *client);
-	int (*suspend)(struct i2c_client *client, pm_message_t state);
-	int (*resume)(struct i2c_client *client);
-	int (*legacy_probe)(struct i2c_adapter *adapter);
-	int legacy_class;
-	const struct i2c_device_id *id_table;
-};
-
-static struct v4l2_i2c_driver_data v4l2_i2c_data;
-static const struct i2c_client_address_data addr_data;
-static struct i2c_driver v4l2_i2c_driver_legacy;
-static char v4l2_i2c_drv_name_legacy[32];
-
-static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind)
-{
-	return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver_legacy,
-			v4l2_i2c_drv_name_legacy, v4l2_i2c_data.probe);
-}
-
-static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter)
-{
-	if (v4l2_i2c_data.legacy_probe) {
-		if (v4l2_i2c_data.legacy_probe(adapter))
-			return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy);
-		return 0;
-	}
-	if (adapter->class & v4l2_i2c_data.legacy_class)
-		return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy);
-	return 0;
-}
-
-static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client)
-{
-	int err;
-
-	if (v4l2_i2c_data.remove)
-		v4l2_i2c_data.remove(client);
-
-	err = i2c_detach_client(client);
-	if (err)
-		return err;
-	kfree(client);
-	return 0;
-}
-
-static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state)
-{
-	return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0;
-}
-
-static int v4l2_i2c_drv_resume_helper(struct i2c_client *client)
-{
-	return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0;
-}
-
-/* ----------------------------------------------------------------------- */
-
-/* i2c implementation */
-static struct i2c_driver v4l2_i2c_driver_legacy = {
-	.driver = {
-		.owner = THIS_MODULE,
-	},
-	.attach_adapter = v4l2_i2c_drv_probe_legacy,
-	.detach_client = v4l2_i2c_drv_detach_legacy,
-	.suspend = v4l2_i2c_drv_suspend_helper,
-	.resume  = v4l2_i2c_drv_resume_helper,
-};
-
-/* ----------------------------------------------------------------------- */
-
-/* i2c implementation */
-static struct i2c_driver v4l2_i2c_driver = {
-	.suspend 	= v4l2_i2c_drv_suspend_helper,
-	.resume  	= v4l2_i2c_drv_resume_helper,
-};
-
-static int __init v4l2_i2c_drv_init(void)
-{
-	int err;
-
-	strlcpy(v4l2_i2c_drv_name_legacy, v4l2_i2c_data.name, sizeof(v4l2_i2c_drv_name_legacy));
-	strlcat(v4l2_i2c_drv_name_legacy, "'", sizeof(v4l2_i2c_drv_name_legacy));
-
-	if (v4l2_i2c_data.legacy_class == 0)
-		v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG;
-
-	v4l2_i2c_driver_legacy.driver.name = v4l2_i2c_drv_name_legacy;
-	v4l2_i2c_driver_legacy.id = v4l2_i2c_data.driverid;
-	v4l2_i2c_driver_legacy.command = v4l2_i2c_data.command;
-	err = i2c_add_driver(&v4l2_i2c_driver_legacy);
-
-	if (err)
-		return err;
-	v4l2_i2c_driver.driver.name = v4l2_i2c_data.name;
-	v4l2_i2c_driver.id = v4l2_i2c_data.driverid;
-	v4l2_i2c_driver.command = v4l2_i2c_data.command;
-	v4l2_i2c_driver.probe = v4l2_i2c_data.probe;
-	v4l2_i2c_driver.remove = v4l2_i2c_data.remove;
-	v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table;
-	err = i2c_add_driver(&v4l2_i2c_driver);
-	if (err)
-		i2c_del_driver(&v4l2_i2c_driver_legacy);
-	return err;
-}
-
-static void __exit v4l2_i2c_drv_cleanup(void)
-{
-	i2c_del_driver(&v4l2_i2c_driver_legacy);
-	i2c_del_driver(&v4l2_i2c_driver);
-}
-
-module_init(v4l2_i2c_drv_init);
-module_exit(v4l2_i2c_drv_cleanup);
