Smallville is based mostly on Superboy comics. In those comics (and the Superman comics that followed) Lana never found out that Clark was Superman. Even though she suspected it at times, Clark always threw her false clues.
In 1986 there was something called Man of Steel, which restarted Superman's origin. It was written by a Marvel writer, so the new Lex looked like the Kingpin, Superman got his powers like the X-men, Lana knew all along, and he was never Superboy. Here's a comparison of Superboy (classic) comics, Man of Steel (newer comics origin), and the Smallville TV show.
Lex Luthor:
Superboy- Lex lost his hair because of an accident in Smallville. He and clark were friends.
Man of Steel- Lex was never in Smallville.
Smallvile: Lex lost his hair because of an accident in Smallville. He and clark were friends.
Superman Comes to Earth:
Superboy: Kents find him as a toddler and adopt him.
Man of Steel: Kents find him being birthed out of a gestation matrix. They lie and say that Clark is their natural child.
Smallville: Kents find him as a toddler and adopt him.
Pete Ross:
Superboy: Pete knew Clark's identity and told noone.
Man of Steel: Pete didn't know.
Smallville: Pete knew Clark's identity and told noone.
Indian Caves:
Superboy: There were Indian caves by Clark's house.
Man of Steel:
who cares
Smallville: Indian caves by Clark's house.
So Smallville doesn't actually deviate very far from the comics...it's just based on the original ones.